Skip to content

fix(retro): restore artifact copying and report failure evidence - #1072

Draft
tbhb-agent wants to merge 1 commit into
mainfrom
fix/1031-20261102
Draft

tbhb-agent wants to merge 1 commit into
mainfrom
fix/1031-20261102

Conversation

@tbhb-agent

Copy link
Copy Markdown
Contributor

Summary

Skip missing extras, reject directories containing their copy destination, and preserve empty or partial output from failed canned reports. Add artifact regression tests against the unchanged shell.

Why

Dangling links counted as copied extras, self-containing directories recursively copied the output tree, and failed reports discarded their output. These outcomes prevented the Go engine from preserving the expected evidence.

Verification

Delivery head: 51a638c. Commands passed on the tree committed at this head.

AC Status Evidence
AC1 Met go test ./internal/retro ./internal/agentrepo passes TestRetroNew, TestRetroSymlinkedTranscript, and TestRetroDanglingExtra. Checks cover independent transcript content, linked transcripts, and canned report contents against shell expectations.
AC2 Met TestRetroDanglingExtra checks copied files and directories against the frozen shell. Links at both levels preserve their targets. Missing and dangling extras produce matching warnings and counts.
AC3 Dropped in issue AC6 supplies the deterministic self-copy contract.
AC4 Met TestRetroReportFailureEvidence passes for every report with empty and partial output. Cases cover new and existing destinations. After either engine exits nonzero without a success summary, the failing file contains exactly its output. Completed reports refresh while later reports keep their previous contents.
AC5 Met All required commands pass, as listed next. Size measurement with scc 4.1.0 confirms the change is within limits, including the complete new test file. The diff keeps all original tests and doesn't change generated copies, gates, exclusions, or shell entry points.
AC6 Met TestRetroSelfContainingExtra passes for ., a containing directory, and a path through a symlinked component. Each fails with the self-copy diagnostic, empty standard output, the only transcript copy, and no retrospective document. Assertions use Go outcomes directly.

AC5 commands and results:

  • go vet ./internal/retro ./internal/agentrepo: pass.
  • go test ./internal/retro ./internal/agentrepo: pass.
  • mise run lint-go: pass.
  • mise run check-generated-skills: pass.
  • mise run cover-go: fresh profile passes required coverage floors for files, packages, and total.
  • go run ./cmd/agentrepo size --base origin/main --format json: pass (within bounds).

The commit wrapper passed mise run lint, mise run test, and gitleaks. A separate private-string leak scan passed with the configured lists loaded. SSH verification confirms the signature against the configured public key.

No doc impact. Existing docs describe the artifact contract restored here.

Activation belongs to #1002 (No consumer impact). Frozen shell entry points are unchanged.

Risk

Path resolution could reject a valid directory or miss containment. Regression tests cover ordinary directories and paths through symlinked components. Failed reports intentionally leave empty or partial files. Revert this commit to undo the change before activation.

Related

Closes #1031. Follows #1046 and #1048. Separate preflight parity has issue #1032. Activation has issue #1002.

Dangling extras must not count as copied evidence, and directories
containing the destination must fail before copying their own output.
Failed reports must keep exactly what the invocation emitted so users
can inspect the output after an unsuccessful retrospective creation.

Assisted-by: codex:gpt-6.1-sol
Signed-off-by: Tony Burns <tony@tonyburns.net>
@tbhb-agent tbhb-agent added change:fix PR fixes a defect (Conventional Commit type fix) provenance:agent-assisted PR contains commits authored with AI assistance (see Assisted-by trailers) labels Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:fix PR fixes a defect (Conventional Commit type fix) provenance:agent-assisted PR contains commits authored with AI assistance (see Assisted-by trailers)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore retrospective artifact copying parity

1 participant