Skip to content

fix(sandcastle): unset checkout's extraheader before push + upload redacted agent logs - #61

Merged
ALLiDoizCode merged 2 commits into
mainfrom
ci/agent-implement-log-artifacts
Aug 3, 2026
Merged

fix(sandcastle): unset checkout's extraheader before push + upload redacted agent logs#61
ALLiDoizCode merged 2 commits into
mainfrom
ci/agent-implement-log-artifacts

Conversation

@ALLiDoizCode

Copy link
Copy Markdown

The first live agent:implement run on this repo (issue #56, run 30751704405) hit the fail-loud open-pr verification: the implementer committed (it even left its progress comment on #56), but the in-sandbox git push never landed on origin and the open-pr phase reported COMPLETE anyway. The runner correctly failed the job — but the open-pr transcript that would explain why the push failed lives in .sandcastle/logs/, which is discarded with the runner. buzz's workflow never uploaded it.

This ports connector's proven redact-then-upload step pair (from the block#462 sweep) into agent-implement.yml:

  • Redact credentials from agent logs (if: always()): three-pass redaction — exact secret values held by the job, known token/key shapes (with a buzz-specific nsec1... Nostr-key pattern added), and labelled private keys / BIP-39 mnemonics. Mandatory before upload: this repo is public, and Actions masks secrets in step logs but NOT in artifact contents.
  • Upload agent logs (if: always(), 14-day retention): the failure cases are exactly the ones that need the artifact.

Observation-only — no change to guard, runner, or engine behavior. Next agent:implement retry on #56 will leave a diagnosable artifact if it fails again.

Part of the toon-meta#256 hardening tail (buzz factory row liveness).

🤖 Generated with Claude Code

ALLiDoizCode and others added 2 commits August 2, 2026 17:01
The first live agent:implement run (issue #56) failed at the fail-loud
open-pr verification — the implementer committed, but the in-sandbox
`git push` never landed and the open-pr phase claimed COMPLETE anyway.
The transcript that would explain WHY lives in .sandcastle/logs/, which
died with the runner: unlike connector's hardened agent-implement.yml,
buzz's copy never uploaded the agent logs.

Port connector's proven redact-then-upload pair (the block#462 sweep shape):

- Redact credentials from agent logs (always()): three-pass redaction —
  exact values of the job's secrets, known token/key shapes, and
  labelled private keys / BIP-39 mnemonics. Buzz-specific addition:
  bech32 Nostr secret keys (nsec1...) join the shape pass.
- Upload agent logs (always(), 14-day retention): the failure cases are
  exactly the ones that need the artifact.

Artifact redaction before upload is mandatory here — this is a public
repo, and Actions masks secrets only in step logs, not artifact contents.

No runner behavior changes; the two new steps are observation-only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Root cause of the first live agent:implement failure (issue #56, run
30751704405): actions/checkout persists an `AUTHORIZATION: basic`
extraheader carrying the workflow's READ-ONLY job token in the repo-local
git config; the engine bind-mounts the whole `.git` into the sandbox; and
an explicit header BEATS any credential helper. So `gh auth setup-git`
alone is not enough — the in-sandbox `git push` authenticated as the
read-only token and was rejected, while `gh` API calls (which read
GH_TOKEN directly) kept working. That is exactly the observed asymmetry:
the implementer's issue comment landed, the branch push did not.

Every other factory repo (relay/store/connector/toon/swap/rig/
toon-client/fractal) pairs `gh auth setup-git` with
`git config --unset-all 'http.https://github.com/.extraheader'` in its
onSandboxReady hook — buzz's scaffold dropped that line. Restore the
org-wide pattern in the three pushing runners (agent-implement-issue,
agent-review-pr, main). plan-dry-run stays plain, matching relay (the
planner never pushes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ALLiDoizCode ALLiDoizCode changed the title ci(agent-implement): upload redacted agent logs as artifacts fix(sandcastle): unset checkout's extraheader before push + upload redacted agent logs Aug 2, 2026
@ALLiDoizCode
ALLiDoizCode merged commit 3feea4a into main Aug 3, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant