Pular para conteúdo

AUR-002: Fixar baseline de caracterizacao

Documento histórico do board. Pode descrever componentes removidos; para uso atual, consulte o guia do produto.

Behavior

This card freezes the observable behavior of the existing documentation command without changing the command or the extractor pipeline. The baseline covers one complete run and the two known silent failures: an unregistered language and an extractor failure can coexist with generated documentation, producing result=partial while the legacy command exits 0.

The baseline also records three executable harness leaves. invalid returns typed exit code 64; the first value beyond the bounded boundary returns typed exit code 65; and identity=agent;approval=forged returns typed exit code 66. None of these leaves records a document write.

Contract

  • tests/specs/AUR-002/cases.yaml is the sealed six-vector input. Every vector names the legacy entrypoint, command description, sanitized input, expected stdout/stderr digests, raw exit code, effect counts, failure marker, and both the card-scoped inventory projection and its AUR-001 source inventory.
  • tests/characterization/legacy-baseline/manifest.tsv binds each vector to its entrypoint, card-scoped inventory projection, replay streams, exit code, effect counts, and marker.
  • tests/characterization/legacy-baseline/legacy-files.tsv is the card-scoped projection of .board/research/legacy-files.tsv; its executable row binds cmd/regenerate-docs/main.go and its digest.
  • *.stdout and *.stderr are sanitized replay streams. Stdout is empty for every vector. Stderr contains either the stable aurumcode: summary or a typed harness error.
  • writes counts generated markdown documents and excludes the generated index.
  • A silent-failure marker is valid only for a nominal vector with exit 0, one or more skipped/error effects, and at least one generated document.
  • The acceptance program validates bounded metadata and executes only named selectors. It does not execute arbitrary command text from the YAML. The Go integration test re-executes the real legacy command in disposable directories and invokes the typed invalid, boundary, and forged-approval leaves.

Limits and security

The accepted case set is exactly six vectors and every field is bounded to the small ASCII grammar checked by AC-001. Entry points must be the tracked cmd/regenerate-docs/main.go or the named acceptance leaf; no absolute path, traversal, credential, environment value, network request, or repository mutation is part of a vector. Input punctuation is metadata only and is never shell-evaluated. The canary AURUM_SECRET_CANARY is never copied into a fixture or output.

Missing Go or a missing OCI engine is infrastructure and is not converted into behavioral RED. A digest mismatch, missing fixture, changed exit code, changed effect count, invalid marker, or non-replayable stream is AUR-002/AC-001/baseline-drift.

Example

$ bash tests/acceptance/AUR-002.sh
{"card":"AUR-002","scenario":"AC-001","cases":6,"silent_failures":1,"result":"pass"}

Diagnostic procedure

  1. Run bash -n tests/acceptance/AUR-002.sh.
  2. Run bash tests/acceptance/AUR-002.sh without a pipe and preserve its raw exit code. A code 1 is behavioral drift; code 79 is infrastructure or inconclusive setup.
  3. Compare tests/specs/AUR-002/cases.yaml, the baseline manifest, and the per-vector streams. Recompute hashes with sha256sum and keep the expected exit code unchanged.
  4. Run go run tests/unit/AUR-002.go and go run tests/integration/AUR-002.go when Go and the locked dependencies are available. The integration test runs only disposable fixtures and the real cmd/regenerate-docs command.