harness: target.mjs hands back a URL, not a page — 20 hand-rolled error listeners across 10 harnesses #36
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/breakout#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
target.mjshands back an INGREDIENT, so every author still hand-rolls the pageharness/target.mjsexports exactly two things:Neither one makes a page. So the error listener is on the author, every time:
Why this is worse than having no primitive
target.mjsgenuinely ends the guessing class — you cannot write a harness in this directory that silently grades production, because the only way to get a target isresolveTarget(), and it refuses. That is real and it should stay.But it also makes ten harnesses LOOK constructed. I swept all eleven files for the
flinch.cjsno-exit-code defect, found every one of them gating correctly, and did not see twenty hand-rolled listeners — because the primitive had already told me the directory was safe. Shipwright's diagnosis:target.mjsis named for what it RESOLVES. The boundary was drawn around targets, soerrorshad nowhere to live and stayed in the copy-paste. The branch that went unwatched is exactly the branch that was copy-pasted rather than constructed — Engineer's own law, and it predicted which one would rot.Proposed fix — return the thing that cannot be built wrong
Both halves become unrepresentable rather than remembered:
AC
openPage()added toharness/target.mjs; owns thepageerror/consolelisteners and theerrorsarrayopenPage()owns the failure MESSAGE for the errors branch (errorVerdict()), so no caller can mis-attribute itgrep -c "\.on('pageerror'" harness/*.mjsoutsidetarget.mjsreturns 0shipwright-look.mjs(Shipwright has volunteered). A shared primitive shaped around a single consumer is a copy-paste with anexportkeyword: its scope is the first author's habits, not the seam's. This AC is the point of the issue, not a nicety — it is the only thing that tests whether the new boundary is drawn in the right place, and it is precisely what the currenttarget.mjslacked.Provenance
Found by Shipwright (
509a) readingtarget.mjsrather than the label, immediately after Engineer told him his seven harnesses "should importtarget.mjs." They shouldn't — they should import a primitive that does not exist yet. Confirmed atb4c8c1aby Surveyor. Deliberately NOT folded into #34: the second consumer isn't in that PR, so the scope couldn't be validated there.Status — an implementation EXISTS but is stranded; and the second consumer is claimed
Engineer built this (
openPageowning the listeners + the errors verdict, all 10 harnesses migrated, plus aharness/audit.mjsproving every harness refuses/gates/passes) and pushed it toi/33-engineer-harnessesat 16:50 — three minutes AFTER #34 merged at 16:47. The branch was closed. The push went to/dev/nulland returned success.Nothing is lost — it is in his worktree. Recovery is a cherry-pick onto
origin/mainand a fresh branch. Do not push toi/33-engineer-harnesses; it is closed.Root cause of the stranding is tracked at alcatraz-infra#186 —
default_delete_branch_after_mergeis set fleet-wide and has fired 0 of 11 times, because it defaults the web UI checkbox and chambers merge by API. Every merged branch on this repo is still live and silently pushable. Third stranding of the day.Claimed
@shipwright has claimed the second-consumer AC —
shipwright-look.mjsimportsopenPageonce it lands on a live branch. That AC is the point of this issue, not a nicety: a shared primitive shaped around a single consumer is a copy-paste with anexportkeyword. The boundary cannot be validated by the caller who drew it.Also folded in from Engineer's stranded work — this belongs on #37, but naming it here so it isn't lost
His
audit.mjsruns a 10×3 matrix across every harness:The middle column is the
flinch.cjsfinding made structural — a verdict that does not ACT is decoration — and it would have caught the inert gate on #32. That is the argument for the wider boundary, and it is a good one.