mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-25 09:31:43 +01:00
Teach agents nine habits that several teams learned the hard way (GST-3336) (#4585)
Agents using gstack now get nine working habits that three or four teams each reached on their own: don't write a file back from a cut-off read, change the design when reviews keep finding the same kind of bug, narrow a safety guard only with a tested exemption, prove a change on the real path, move timers and automations with a handoff, land base-branch settings first, and check that a check can see your change. Why: each habit cost one of those teams a lost file, a leaked key, an outage or extra review rounds. Nothing to do as a reader. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: v1/adversarial-native#2 reader=adversarial-native
This commit is contained in:
1 parent
41729a023e
commit
ebc867422e
12 files changed
+65
-10
No files matched your search
@@ -164,6 +164,26 @@ reverted rather than the whole crew waiting on a root cause, and a finding at th
|
||||
blocking floor ([review-policy.md](../../docs/review-policy.md)) still stops the PR it is
|
||||
found in.
|
||||
|
||||
When a review round finds another case of a kind an earlier round already found (another
|
||||
bypass, another misfire, another double-send path), a lane stops patching cases and changes
|
||||
the design. Either it lists every case up front (each caller or trigger against each
|
||||
outcome: done, failed, failed partway, refused, retried) with a test for each case that
|
||||
sends, deletes or grants, or it rebuilds on a shape that can't have that kind of bug, such
|
||||
as an allowlist of named file types instead of a guess about what a file contains. Four
|
||||
crews reached this on their own: one PR met a new double-send path in each of four rounds,
|
||||
one took five /ship runs before an allowlist rebuild passed in one, one closed a
|
||||
pattern-matching PR for a rebuild after every round found new misfires, and one dropped
|
||||
exemptions after reads kept finding bypasses.
|
||||
|
||||
To narrow a safety or security guard that catches too much, a lane keeps the broad match
|
||||
and adds an exemption that a test proves, never a narrower replacement match. A guard that
|
||||
decides by matching command text is bypassed by quoting, environment variables,
|
||||
redirection, `xargs` or a renamed program, so when reviews keep finding bypasses of an
|
||||
exemption, drop the exemption and change the caller or remove the capability instead.
|
||||
Three crews hit this: three review blockers on one PR came from replacing a broad match
|
||||
with a narrower one, a narrowed command hold was bypassed three ways, and a wrapper that
|
||||
blocked one migration command outright broke every upgrade.
|
||||
|
||||
## Lane context
|
||||
|
||||
Every step a lane takes re-reads its whole conversation. A step within about five minutes
|
||||
@@ -264,6 +284,15 @@ went stale and conflicting, and started to look like junk.
|
||||
does this for rotations), while the old thread stays: a successor never makes archiving a
|
||||
thread with an open PR OK. When no successor is needed yet, the Captain takes the work
|
||||
itself, on an issue assigned to a live thread with the trigger written in it.
|
||||
- **Move the clock with the work.** A successor brief lists every wait, watch, webhook and
|
||||
automation the old thread holds, not only its PRs, and the successor registers and
|
||||
confirms each one before the old thread cancels its own, because archiving a thread can
|
||||
pause its automations. A thread holding a deadline checks its waits after every wake,
|
||||
because another wake can end a timer wait for good, and a paid run on an unattended
|
||||
machine collects its own results at the end of its chain instead of trusting a later
|
||||
wake. Three crews lost work this way: an archive paused a one-shot automation, timer
|
||||
waits ended by other wakes never came back, and a wake that came about seven hours late
|
||||
let a VM reaper take a run's ledger.
|
||||
- **Archive through the check.** Before archiving any crew thread, re-assign every open
|
||||
issue it holds to a live thread or close it, then archive with the one program below. It
|
||||
reads the thread and its open issues, runs `gstack-archive-check thread`, and archives
|
||||
|
||||
Reference in new issue
Block a user