Skip to content

ci(factory): run forensics — org-uniform redaction/upload + timeout split (toon-meta#278) - #155

Merged
ALLiDoizCode merged 3 commits into
mainfrom
epic270/278-run-forensics
Aug 6, 2026
Merged

ci(factory): run forensics — org-uniform redaction/upload + timeout split (toon-meta#278)#155
ALLiDoizCode merged 3 commits into
mainfrom
epic270/278-run-forensics

Conversation

@ALLiDoizCode

Copy link
Copy Markdown

Adds the infrastructure half of run forensics to both sandcastle runner workflows (agent-implement.yml, agent-review.yml), uniform across the 11 factory repos; the prompt half (commit the handoff note with git add -f) landed with toon-meta#273's sibling tickets.

What changed

1. Redacted log artifact upload (if: always()) — both workflows now end with:

  • a redaction step: the org-uniform pattern proven in connector (the fix(ci): use cargo update --workspace instead of generate-lockfile block/buzz#462 sweep) plus buzz's nsec1 shape — three passes (exact secret values held by the job, known token/key shapes, BIP-39 mnemonics + labelled private keys). Actions masks secrets in step logs but never in artifact contents, and this repo is public, so redaction runs before every upload.
  • an actions/upload-artifact@v4 step for .sandcastle/logs/ and .sandcastle/worktrees/*/.sandcastle/logs/ — the worktree glob captures the committed-but-never-pushed handoff-<task-id>.md a killed run leaves behind (its sandbox.close() never ran, so the bind-mounted worktree survives on the host).

2. Timeout vs maxIterations, reconciled — decision (uniform fleet-wide): keep maxIterations: 100, keep the job timeout, and split the wall clock with a step-level timeout on the runner step (implement 50/60, review 25/30; connector, which already mints a fresh push token mid-run, keeps 180 and gets 170). Rationale, also recorded as comments in the workflows:

  • maxIterations is a runaway-loop guard, not a time budget — an iteration has no fixed duration, so no iteration count can be made to "fit" a wall clock. The wall clock is the real budget.
  • The job timeout is deliberately not raised to connector's 180 here: this repo still pushes with the App token minted at job start, which expires one hour in (connector#462). A longer clock would let a run finish its work and still lose the push. Raise to 180/170 only when the mid-run token mint is ported (toon-meta#248).
  • The step-level timeout is what makes forensics reliable: a wall-clock kill is now an ordinary step failure, leaving the remaining job budget for the always() redact+upload steps — a job-level kill would take those down with it.

Proof

The mechanism was proven in toon-meta (see toon-protocol/toon-meta#297): the redaction script against planted fake secrets locally (all shapes redacted, bare tx hash survives), and a live throwaway-branch run showing a step-timeout kill still runs the exact canonical redact + upload steps and the artifact contains the redacted logs plus the worktree handoff note. This repo's port is the same blocks verbatim, YAML-validated.

Part of toon-protocol/toon-meta#270
Part of toon-protocol/toon-meta#278

ALLiDoizCode and others added 3 commits August 5, 2026 19:36
…l timeout split (toon-meta#278)

agent-implement.yml: REPLACED the existing redact + upload steps (buzz's own
port of connector's pattern) with the canonical org-uniform blocks — same
nsec1 shape, now with the .sandcastle/worktrees/*/.sandcastle/logs/ sweep and
upload glob; ADDED the wall-clock rationale comment on the job timeout (kept
at 60) and a step-level timeout-minutes: 50 on the runner step.

agent-review.yml: ADDED the forensics-split comment on the job timeout (kept
at 30), a step-level timeout-minutes: 25 on the runner step, and the canonical
redact + upload steps (previously absent).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…te was dropped as hidden (toon-meta#278)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ALLiDoizCode
ALLiDoizCode merged commit f7e6f83 into main Aug 6, 2026
15 of 16 checks passed
@ALLiDoizCode
ALLiDoizCode deleted the epic270/278-run-forensics branch August 6, 2026 00:08
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