fix(skills/ten-lane-highway): ship the two sweep guards a tool update kept reverting - #299
Conversation
…pdate kept reverting
Both fixes below were applied by hand to the INSTALLED skill dir
(~/.local/share/uv/tools/amplifier/.../data/skills/ten-lane-highway) and an
`amplifier` tool update re-installed that directory on 2026-09-03 at 05:54-06:13
and silently reverted them. No warning, no version check. The reverted mechanism
is the one that stops a lane's `sweep` from destroying every other lane's DTUs --
the failure that cost lanes l1 and 161 three DTUs each, 35 minutes into their
measurements, on 2026-09-02. It was found only because a later item's acceptance
happened to re-test the case, and the case was run instead of assumed.
Re-applying by hand after each update requires knowing an update happened AND
remembering every fix ever applied. Neither is true of a system that has already
forgotten twice. The fix is to put them where a tool update DELIVERS them.
PORTED, NOT REDESIGNED. The installed file was copied over the repo file
byte-for-byte, so the implementation here is literally the measured one; the only
subsequent edit is the usage header, which described a `sweep` that no longer
exists.
* multi-lane guard (model_performance-0rg): `sweep` exits 3 and runs NO
destroy_cmd when open rows span >1 owner or any row is unattributable.
`--all-owners` is the manager's batch-close override.
* already-absent handling (model_performance-bqu): a destroy_cmd failing with a
NARROW not-found signature closes the row as `swept:already-absent` --
distinct from `swept`. A real failure still exits non-zero and leaves the row
open, so the signal that a teardown genuinely failed is never lost.
SKILL.md lands in the same change because 0rg's acceptance required it: a guard
that deadlocks the documented close is a regression, not a fix. `sweep` is now
documented as the manager's batch-close verb (never a lane's), the lane-scoped
teardown tool is named as the alternative, and every close instruction says
`sweep --all-owners`. Note this half could not be ported -- `--all-owners` was 0
matches in BOTH the installed and repo SKILL.md, i.e. cycle 49's re-apply restored
the guard but not its docs. A partial re-apply is worse than a total one, because
the surviving half looks like the whole thing.
Tests cover all five measured cases and use an observable destroy_cmd
(`touch <sentinel>`) so "ran nothing" is PROVEN, not inferred from an exit code.
Against the pre-port script 7 of 12 fail; against this one, 12/12 pass.
Full skills-tree diff vs the installed copy: exactly one file had drifted
(infra_ledger.sh). No other silent manager patch is sitting in the installed tree.
…names The goal names `docs/lanes/2nz-upstream-skill-guards/DONE-NOTE.md` twice, once inside SCOPE-OUTS. This lane first placed it under `ai_working/` because `check_lane_artifact_paths.py` resolves this repo to `ai_working/<lane>/` [R2 ai_working/]. That was the wrong call: a checker's preference does not outrank an explicit instruction in the spec, and the goal's path has three precedents at origin/main in this very repo (eem-partial-accumulator-widen, 9w0-delegate-timeout-partial-producer, n1i-resume-thread-role). The SCOPE-OUT's real hazard -- the repo-root DONE-NOTE.md that item kez was filed for, where every lane silently overwrote the last -- is avoided either way; the disagreement is only between two live conventions in one repo. Recorded in the note as a goal-vs-checker conflict for the manager to settle, not resolved unilaterally: artifact-path/v1 and the goal template disagree for amplifier-app-cli, and until one of them moves, every lane here is graded against a rule its own goal contradicts.
Manager verification — the durability fix for today's silent guard revert. Merging.Head (a) Drift — I re-ran the comparison myself, not from the marker
Exactly one file, and only one. So no other silent manager patch is hiding in that tree — which is the thing I most wanted to know after today's revert, and it is the reassuring answer. (b) Guards present, and the tests are the strong kind
The tests RUN the thing, they do not grep for it. Of 11 functions only Fail-before against (c) The
|
What happened
Two fixes were applied by hand to the installed skill directory
(
~/.local/share/uv/tools/amplifier/.../amplifier_app_cli/data/skills/ten-lane-highway).An
amplifiertool update re-installed that directory on 2026-09-03 at 05:54–06:13and silently reverted them — no warning, no version check.
The reverted mechanism is the one that stops one lane's
sweepfrom destroying everyother lane's DTUs. That is not hypothetical: on 2026-09-02 a single foreign
sweeptooklane
l1's three DTUs and lane161's three, 35 minutes into their measurements.For some window on 2026-09-03 that harm was live again. Nothing was lost only because
every live lane that cycle happened to have no infrastructure registered — luck, not design.
It was found only because a later item's acceptance criteria happened to require
re-testing the case, and the case was run rather than assumed.
Re-applying by hand after every update is not a fix. It requires (a) knowing an update
happened and (b) remembering every fix ever applied. Neither is true of a system that has
already forgotten twice. This PR puts them where a tool update delivers them.
Ported, not redesigned
The installed file was copied over the repo file byte-for-byte (
diff -qcleanimmediately after), so the implementation here is literally the measured one. The only
subsequent edit is the top-of-file usage block, which described a
sweepthat no longerexists.
model_performance-0rg, markerMULTI-LANE GUARD) —sweepexits 3 and runs no destroy_cmd when the open rows span more than one owner
or any row is unattributable.
--all-ownersis the manager's batch-close override.model_performance-bqu, markerALREADY_GONE_RE) — adestroy_cmd failing with a narrow not-found signature closes the row as
swept:already-absent, distinct fromswept. A real failure still exitsnon-zero and leaves the row
open— deliberately not a blanket exit-code amnesty,or the signal that a teardown genuinely failed would be destroyed.
SKILL.md lands in the same change — and this half could not be ported
0rg's own acceptance required guard and docs together: a guard that deadlocks thedocumented close is a regression, not a fix.
sweepis now documented as the manager'sbatch-close verb (never a lane's), the lane-scoped teardown tool is named as the
alternative, and every close instruction says
sweep --all-owners.grep -c "all-owners"was 0 in both the installed SKILL.md and this repo's — so there-apply restored the guard but not its documentation. Until this PR the shipped skill
told a manager to close a batch with a bare
sweep, which the restored guard refuses withexit 3 the moment two lanes hold infrastructure: a documented close that cannot succeed.
A partial re-apply is worse than a total one, because the surviving half looks like the
whole thing.
Tests — and why they are not vacuous
tests/test_ten_lane_highway_infra_ledger.py, 12 tests covering all five measured cases:swept:already-absentopenswept--all-ownersproceedsPlus idempotence (closed rows — including
swept:already-absent— are never re-run, so thefix does not merely move the deadlock), single-owner-allowed, a SKILL.md docs assertion, and
two tests pinning the two drift-check markers so a later rename cannot blind the manager's
stopgap check.
Observable destroy_cmd. Every guard case uses
touch <sentinel>and asserts thesentinel's absence. "Ran nothing" is proven, not inferred — an exit code alone cannot
distinguish refused before acting from acted and then failed.
Discriminating evidence. Against the pre-port script, 7 of 12 fail:
Cases 2, 3 and 5 pass on both by design — they are regression guards on behaviour that must
not change. Windows: module-level skip (POSIX shell script), following this repo's pty-test
precedent rather than a CI deselect.
Did anything else drift?
diff -rqof this repo's wholeamplifier_app_cli/data/skills/tree against the installedtree (installed version 0.1.1, same as this checkout, so version skew cannot explain a
difference): exactly one file differed —
infra_ledger.sh. Every other file in everyother shipped skill was byte-identical. No further silent manager patch is sitting in the
installed tree. The only other drift is the SKILL.md documentation gap described above,
which drifted in the opposite direction (missing from both) and is closed here.
merge_gate.shis not in this skill dir in either copy and never was — it belongs to theevals repo's
.amplifier/evaluation/tools/, so there is nothing to upstream here.Full suite
The manager's stopgap drift check run against this branch's source:
Spend
$0.00. Authority
0 runs × 0 arms × $0.00 / 1.00 valid = $0.00. Pure source change; noDTU, container, or service was created, nothing was registered in the infra ledger, and every
sweepexercised in this lane ran against throwaway pytesttmp_pathledgers — never a realbatch ledger.
Lane note:
docs/lanes/2nz-upstream-skill-guards/DONE-NOTE.md.