@orkestrel/scaffold 0.0.30 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -230,6 +230,16 @@ clobbered edits, formatter and build races, cache phantoms, and validation cross
230
230
  invalidates will repair the same drift the other way and report a state that is already false.
231
231
  Run it before the units, or after them, or send the decision to every unit in flight per the
232
232
  mid-campaign rule under **Dispatch anatomy**. Never beside them.
233
+ 8. A fleet pass that records a per-target status commits only the targets it recorded green. Reading
234
+ "is the tree dirty" instead of "did this target pass" pushes a red target the moment one exists,
235
+ and a flake makes that look like it worked. Refuse the failed row, name it, and re-run it alone
236
+ before deciding what it was.
237
+ 9. Run a fleet pass in slices that report as they finish, never as one block. A block hides its first
238
+ failure behind every target that follows, so the failure surfaces after the work it should have
239
+ stopped. A slice hands control back while most of the fleet is still unstarted.
240
+ 10. Re-run a timing or resource failure alone before believing it. Concurrent slices, builds, and
241
+ suites make a container miss deadlines it meets when idle, so a red result under load is a
242
+ question rather than an answer.
233
243
 
234
244
  ## Execution loop
235
245
 
@@ -641,17 +651,30 @@ flag is what stops the gate chain running a second time inside the five minutes.
641
651
  zero.
642
652
  - Re-probe `whoami` immediately before opening the window. A stored credential expires mid-session,
643
653
  so a session-start answer does not hold.
644
- - Surface each approval URL the moment it appears in the log. Say that approving the publish one
645
- opens a five-minute window covering the rest of the layer.
654
+ - Surface each approval URL the moment it appears in the log, and take the **last** one in log order.
655
+ npm mints a new URL whenever an attempt restarts, and the log accumulates every one, so a URL
656
+ chosen by sorting rather than by position is already dead when the user opens it.
657
+ - Re-read the log before treating an approval as failed. The chain is usually still alive on a newer
658
+ URL, so surface that one rather than relaunching.
659
+ - A `404` on an approval URL usually means the publish already succeeded and consumed it. Read the
660
+ registry before calling it a failure.
661
+ - Say that approving the publish one opens a five-minute window covering the rest of the layer.
646
662
 
647
663
  ### Spending the window
648
664
 
649
665
  - The window opens when the user approves, not when the first publish starts. Chain every remaining
650
666
  publish inside the same process as the gate package, so no human turn sits inside it.
651
667
  - Publish serially. Concurrent publishes collide on the auth handshake and fail each other.
652
- - `EOTP` inside the window is intermittent contention rather than the window closing. Retry each
653
- package about three times before recording it failed, and retry a failed set once the layer ends;
654
- packages have landed on the third attempt and on a later pass with no new approval.
668
+ - **Never retry a publish that is still waiting for its authorization.** Each `npm publish` attempt
669
+ mints a new `authId` and invalidates the previous one, so a retry loop makes the URL a moving
670
+ target the user cannot approve in time. The abandoned poll then reports
671
+ `403 Forbidden - GET /-/v1/done?authId=…`, which reads as a permissions problem and is two attempts
672
+ colliding. Publish the first package of a layer with exactly one attempt.
673
+ - Retry only an upload that failed **inside** an already-open window. `EOTP` there is intermittent
674
+ contention rather than the window closing: retry about three times, and retry a failed set once the
675
+ layer ends. Packages have landed on the third attempt and on a later pass with no new approval.
676
+ These are two different failures wearing similar codes; a retry fixes the second and causes the
677
+ first.
655
678
  - Expect a large layer to outlast one window. Size batches to what uploads in five minutes and tell
656
679
  the user how many approvals to expect, rather than discovering it mid-run.
657
680
  - Read the result from the registry, not from an exit code: a piped `npm publish` reports the exit
@@ -92,6 +92,10 @@ nobody claimed.
92
92
  the orchestrator too:** a tree-wide gate run while a round is live sees the auditors' in-flight probes
93
93
  and reports a failure nobody caused. Wait for the round, or scope the command to paths no auditor
94
94
  owns. Never delete another executor's working file to make your own command pass.
95
+ - **Tell a lane when its own engine wrote the half it is auditing, and tell it to attack that half
96
+ harder.** A fix round reviewed by the engine that wrote it is the case the round exists to avoid,
97
+ and where the pass cannot avoid it, naming it is what recovers the round. A clean pass on its own
98
+ engine's work is the least valuable result a lane can return.
95
99
  - Supply the evidence the subject type requires, per the table above.
96
100
  - Auditors are read-only and spawn nothing.
97
101
  - Blind reports are **immutable**. Nothing an auditor returns is edited, merged, or revised — by
@@ -143,6 +147,14 @@ Follow `references/reconcile.md`. The obligations that are not delegable:
143
147
 
144
148
  - **Reproduce every sharp finding yourself** before acting on it. An auditor's finding is a
145
149
  hypothesis until the orchestrator has run it.
150
+ - **Build before you pack.** `npm pack` runs no build, so it ships whatever `dist/` is on disk. An
151
+ auditor who packs an artifact to inspect it is reading the last build, not the current source, and
152
+ will report deleted exports as still shipping. Run the package's build first, and say in the brief
153
+ that the tarball was built from the commit under audit.
154
+ - **Check the subject before acting on a finding, not only the reasoning.** A brief that names attack
155
+ vectors teaches the lane those vectors matter, and a lane can hand back the brief's own questions as
156
+ the subject's claims — demanding coverage for a property the subject never documented. Grep the
157
+ subject for the claim the finding rests on. Where it is not there, the finding is against the brief.
146
158
  - **A disagreement between auditors is rarely a tie to average.** It is usually two correct answers
147
159
  to two different questions. Find the question each one answered.
148
160
  - **Bound every finding**: state what is _not_ broken, and why the adjacent behaviour that looks the
@@ -73,6 +73,16 @@ endpoint — lockfile generation, real installs, live fetches — belongs to the
73
73
  Orchestrator's own tracked commands or a network-capable native agent. Never put it in a
74
74
  brief. A Sol exec hanging on `npm` until its cap fires is this misroute, not a slow bench.
75
75
 
76
+ ## The exec sandbox mounts `.git` read-only
77
+
78
+ A `workspace-write` exec can write the working tree and cannot write `.git`. Every command
79
+ that takes the index lock fails, `git checkout -- <file>` included.
80
+
81
+ Never write a git command into a brief as a mechanism. A unit that must restore a file it
82
+ mutated restores it by rewriting the original text, and proves it with
83
+ `git diff --exit-code -- <file>`, which reads the index without locking it. Reading commands
84
+ — `status`, `diff`, `log` — are unaffected and stay available.
85
+
76
86
  ## Recovery ladder
77
87
 
78
88
  On any interruption or missing result, in order:
@@ -16,10 +16,10 @@ Require a bounded question and an exact scope.
16
16
  ## Model
17
17
 
18
18
  ```text
19
- CURSOR_GROK_MODEL=cursor-grok-4.5-high
19
+ CURSOR_GROK_MODEL=cursor-grok-4.6-high
20
20
  ```
21
21
 
22
- That id was read from `agent models` on 2026-08-09. Resolve the model from the variable at
22
+ That id was read from `agent models` on 2026-08-13. Resolve the model from the variable at
23
23
  dispatch. Re-read `agent models` and update this line when the id changes. Never guess or
24
24
  substitute a model id.
25
25
 
@@ -115,6 +115,10 @@ kind. It reads declaration syntax and file name, never meaning.
115
115
  - The cleanup sweep and independent review prove kind purity across those files. A helper misfiled
116
116
  as a parser, a coercer misfiled as a guard, a compiler misfiled as a factory, and a shaper
117
117
  misfiled as a cloner are review findings, not red tests.
118
+ - It does not decide barrel membership. It parses each file alone and resolves no module, so it
119
+ cannot tell whether a declaration is reachable from its barrel. That question belongs to each
120
+ package's `tests/guides.test.ts`, which imports the barrel and gets real resolution. Do not add
121
+ module resolution here to duplicate it.
118
122
  - The kind table is mandatory whether or not a test can see the violation.
119
123
 
120
124
  ## Wrapper test
@@ -231,6 +235,15 @@ Both obey:
231
235
  - If a declaration should not be public, make it a true local or runtime-private detail, or remove
232
236
  the capability for a substantive reason. Never leave an intentional reusable export stranded
233
237
  outside the barrel.
238
+ - One-class-per-file evicts some classes from their only caller, and `export` on such a file is
239
+ structural rather than a statement of intent. Barrel that class when a consumer can construct it
240
+ from values they already hold. Intern it — out of the barrel, and named in the package's parity
241
+ `INTERNAL` list — when its constructor requires a value only its owner produces, or when the
242
+ public value is a projection of the instance rather than the instance. A class named in a public
243
+ signature is always barrelled.
244
+ - Delete a barrel row whose class no consumer can construct, and delete its `@example` with it. A
245
+ row obliges a documented, runnable example, so a class kept public without one is drift that
246
+ parity cannot see.
234
247
  - When a symbol moves, update every import; never leave a compatibility re-export.
235
248
 
236
249
  ```ts
@@ -25,6 +25,7 @@ paths:
25
25
  - Never assert an implementation against itself. Compare the answer to a declaration, a fixture, or a second mechanism that could disagree with it. Re-deriving the answer the same way the source derives it produces a test that passes for every value the source ever returns, and it reads exactly like a real one.
26
26
  - Probe a host-varying property at runtime, on the host the test is running on, and assert against what the probe returned. Filesystem case folding, path separators, permission bits, and rename semantics differ per host, so a fixture built on one host describes that host and silently measures something else on the next.
27
27
  - Assert a runtime-chosen result as the property it must have, not as the number one run produced. Compression, timing, and buffer sizing are the runtime's choice, so pin the relationship the test depends on — that the encoded form is larger, that the second call is faster — and let the assertion fail when the input drifts out of the range where that relationship holds.
28
+ - Measure an elapsed interval with `performance.now()`, never `Date.now()`. `Date.now()` returns whole milliseconds, so an interval built from two of its readings truncates at both ends and can under-report by a millisecond — enough to fail a boundary assertion against a timer that behaved correctly. `performance.now()` is monotonic and sub-millisecond, and it does not move when the wall clock does.
28
29
  - Give a conditional skip the mechanism that makes it inapplicable, cited, not the platform name alone. A test skipped on a platform is a test nobody re-examines; a test skipped because a named API rejects a named case is one anybody can re-check.
29
30
  - A regression test records the exact command and its failing count before the fix, and the same command's passing count after.
30
31
  - Use `it.todo()` only for explicitly out-of-scope roadmap work, never to complete the current request. Every `.skip` or conditional skip has a narrow verifiable applicability reason.
@@ -290,7 +290,7 @@ var DEFAULT_ENGINES = `>=${MINIMUM_NODE_VERSION}`;
290
290
  var BASE_DEV_DEPENDENCIES = Object.freeze({
291
291
  "@microsoft/api-extractor": "^7.58.12",
292
292
  "@orkestrel/guide": "^0.0.10",
293
- "@orkestrel/scaffold": "^0.0.30",
293
+ "@orkestrel/scaffold": "^0.0.31",
294
294
  "@types/node": "^26.2.0",
295
295
  oxfmt: "^0.62.0",
296
296
  oxlint: "^1.77.0",