💥 Scope engine state to the operation that owns it - #325

Merged
taras merged 1 commit into
mainfrom
feat/operation-scoped-state
Aug 4, 2026
Merged

💥 Scope engine state to the operation that owns it#325
taras merged 1 commit into
mainfrom
feat/operation-scoped-state

Conversation

@taras

@tarastaras commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closes#323. Carries out architecture.md's State ownership rule (#314).

Why

All state is scoped to the operation that owns it, so it is torn down when the
operation is torn down: created inside the run it describes, provided via
context. No module-scoped registries — not as collections, not hidden inside
library objects that accumulate. One exception: metadata an author declares at
module evaluation, about a value the author owns, may live on that value.

Five declarations in packages/core were on the wrong side of it. Each was one
table per process, shared by every run, that nothing in a caller's scope could
see, override, or clear.

What changes

SiteBeforeAfter
component-failures.tsprinting WeakSeta module-private Symbol on the function
errors.tssegmentCauses WeakMapSegmentCauses, opened per run
validate.tsmodule Ajv + two compile cachesPropsCompiler, opened per run; caches gone
components/parse-schema.tsmodule AjvParseCompiler, opened per run

The printErrors(fn) mark takes the exception, not context. It runs while a
component module is evaluated — outside any operation, with no run to own a
table and no scope to reach — and records what an author declared about a
function the author owns. So it lives on that function: a module-private
Symbol() (not Symbol.for, which anyone could forge), defined non-enumerable
so a wrapper built by copying own properties does not inherit a decision its
author never made, read with Object.hasOwn. This is the exception's one open
application.

The rest become run-scoped.useSegmentCauses(), usePropsCompiler() and
useParseCompiler() are installed where the execution begins and reclaimed with
it. DocumentationError's constructor cannot reach a scope, so reading the
cause moved to a documentationError() builder that runs before it — the cause
is still attached before any observer can see the failure. Expansion driven
directly (a test, a tool describing a document) has no execution around it, so
the outermost expandSegments opens the table for exactly its own lifetime, and
compiling outside a run gets an instance that lives as long as the call.

The two compile caches go rather than move. Ajv memoizes by schema object
within a run already, so a per-run instance is the whole cache. A second table
beside it would only reintroduce the question of which root contract a
remembered validator was compiled under.

Why the Ajv instances count as state

In ajv@8.20.0, _cache is a plain Map and _addSchema does

letsch=this._cache.get(schema);if(sch!==undefined)returnsch;this._cache.set(sch.schema,sch);if(addSchema&&!baseId.startsWith("#")){}

The set is unconditional and precedes the addUsedSchema guard the engine
already sets to false. A module-scoped instance therefore holds a strong
reference to every schema object any run ever compiled, for the life of the
process — and because the key is object identity, it answers a schema object
mutated between runs with the first run's validator. That is not a leak in the
abstract: SO13 demonstrates it through public api alone (a host registers a
component, tightens its props schema, runs again — and the second run accepts
props the schema no longer allows).

The parse path is different and the PR says so: it normalizes its declaration
through parseJson, handing Ajv a fresh object every call, so it never hits the
identity cache. Its harm is unbounded growth rather than a wrong answer, which
is why SO9 asserts the lifetime rather than a stale validator.

The lint rule

local/no-module-scoped-registry (ported from #312's 0673f7d, its
documentation reconciled with the exception this PR applies) reports a Map,
Set, WeakMap or WeakSet built at module scope — declared, exported,
assigned later, held inside another module-scoped value, or a static class
field — with the remedy "create it inside the operation that owns it and provide
it via context." It accepts a table built from its own contents (a constant), an
instance field, and a table handed straight to a call.

Before the conversions it reported 4 of the 5 sites
(component-failures.ts:27, errors.ts:63, validate.ts:85, validate.ts:86).
After them it reports none, and deno task lint is 0 errors.

It does not catch a module-scoped new Ajv(…) — it matches collection
constructors, and the accumulation there is inside a library object rather than
a table this repository wrote. The architecture rule covers it anyway ("not
hidden inside library objects that accumulate"); the rule's own header now says
so, and a reviewer holds that half.

How to verify it

packages/core/tests/state-ownership.test.ts — Tier SO, 13 tests.

SO13 is red on origin/main (verified at f413545, in a throwaway worktree,
using only registerComponents + execute): main renders widget:two where
the schema now requires b. Every other Tier SO test names api this PR
introduces, so "red on main" would only mean the module does not import — no
evidence at all. They are discriminated by mutation instead. All seven were run,
and each reddens exactly the tests that claim its behavior:

MutationReddens
the declaration key is Symbol.forSO4
the declaration is enumerableSO2
the cause table is one per processSO5, SO6
the props compiler is one per processSO8, SO11, SO13
useParseCompiler hands out one shared instanceSO9
a compile cache beside Ajv comes backSO8, SO11, SO13
a fresh compiler per call, even inside a runSO10

Two earlier attempts at these tests reddened under no mutation and were
rewritten rather than kept: SO2 asserted Object.keys, which never lists a
symbol key whatever its enumerability, and SO9 asserted a stale validator on the
path that clones its declaration. SO1, SO3, SO7 and SO12 are ordinary
behavior pins with no mutation of their own.

scripts/tests/no-module-scoped-registry.test.ts covers the rule against both
fixtures.

Breaking

Six published functions become operations. A caller writes yield* where it
previously called; nothing else about any of them changes.

  • compilePropsSchema, compileReturnsSchema, validateProps,
    validateReturnValue — they reach the run's compiler.
  • parseMarkdownDefinition — it compiles the schemas it parses.
  • prepareElicitation, elicit — they compile the question's schema.

compileParseSchema is internal and changes the same way. The use* installers
are deliberately not exported: execute() installs them, direct expansion
opens what it needs, and a call outside a run gets its own instance — so no host
has to learn about them.

A generator conversion has a silent failure mode worth knowing about in
review: a discarded call (compilePropsSchema(props); as a statement) type-checks
and then validates nothing, because nothing iterates it. Every such site was
converted — definition.ts, registration.ts, execute.ts, and the
expect(() => …).toThrow(…) assertions across five test files, which would
otherwise have gone quietly green.

Scope

Included

  • The five conversions, the lint rule, and Tier SO.
  • The mechanical yield* at every call site, including tests.

Intentionally unchanged

  • <Retry>, <Result as>, suspension and the error middleware Js api stay
    defined and unbuilt. No semantics change and no vocabulary change.
  • packages/web already builds a fresh Ajv per call via createServerAjv(), so
    it needed nothing.
  • The remaining module-scoped Sets in packages/ (EACH_PROPS,
    RESERVED_STRUCTURAL, the secret-scanner word lists) are constants built from
    their own contents. The rule accepts them by design.

Verification

GateResult
deno task lint0 errors, formatting clean
deno task check0 errors
deno task test349 passed, 0 failed
deno task check:jsrSuccess Dry run complete
pnpm exec tsc --project tsconfig.node.json --noEmitclean
compiled-binary smokepass — main suite, value root, -e '<Badge />', test-agent worker, <WebForm> preflight

Test counts: 344 → 349 passed, 2352 → 2367 steps. The delta is exactly the
new tests — Tier SO's 4 suites (13 steps) and the rule's 1 suite (2 steps).
Nothing else moved.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

architecture.md: "All state is scoped to the operation that owns it, so it
is torn down when the operation is torn down: created inside the run it
describes, provided via context. No module-scoped registries — not as
collections, not hidden inside library objects that accumulate."
Five declarations in packages/core were on the wrong side of that.
The `printErrors(fn)` mark takes the rule's one exception: it is declared
at module evaluation about a function the author owns, so it moves onto
that function under a module-private Symbol rather than into a table.
The segment-cause table and both Ajv instances become run-scoped, provided
via context and reclaimed with the run. The two compile caches beside Ajv
go: Ajv memoizes by schema object within a run, so a per-run instance is
the whole cache — and a shared one answered a schema object mutated
between runs with the first run's validator.
`local/no-module-scoped-registry` reports the shape from now on.
Closes#323.
@github-actions

Copy link
Copy Markdown

PR #325: 💥 Scope engine state to the operation that owns it

28 files, +979 / -200

Scope

🔴 PR has 1179 lines changed. Split into focused PRs.

🟡 1179 lines changed. PRs under 400 receive more thorough review.

🟡 28 files changed. Are all changes related?

🟡 PR mixes config and source changes.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras merged commit 7d7bdf2 into mainAug 4, 2026
10 checks passed
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 10, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 12, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 14, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 22, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 24, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
@taras
taras deleted the feat/operation-scoped-state branch August 27, 2026 01:34
Sign up for freeto 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.

💥 Scope engine state to the operation that owns it

1 participant

@taras
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

💥 Scope engine state to the operation that owns it - #325

Merged
taras merged 1 commit into
mainfrom
feat/operation-scoped-state
Aug 4, 2026
Merged

💥 Scope engine state to the operation that owns it#325
taras merged 1 commit into
mainfrom
feat/operation-scoped-state

Conversation

@taras

@tarastaras commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closes#323. Carries out architecture.md's State ownership rule (#314).

Why

All state is scoped to the operation that owns it, so it is torn down when the
operation is torn down: created inside the run it describes, provided via
context. No module-scoped registries — not as collections, not hidden inside
library objects that accumulate. One exception: metadata an author declares at
module evaluation, about a value the author owns, may live on that value.

Five declarations in packages/core were on the wrong side of it. Each was one
table per process, shared by every run, that nothing in a caller's scope could
see, override, or clear.

What changes

SiteBeforeAfter
component-failures.tsprinting WeakSeta module-private Symbol on the function
errors.tssegmentCauses WeakMapSegmentCauses, opened per run
validate.tsmodule Ajv + two compile cachesPropsCompiler, opened per run; caches gone
components/parse-schema.tsmodule AjvParseCompiler, opened per run

The printErrors(fn) mark takes the exception, not context. It runs while a
component module is evaluated — outside any operation, with no run to own a
table and no scope to reach — and records what an author declared about a
function the author owns. So it lives on that function: a module-private
Symbol() (not Symbol.for, which anyone could forge), defined non-enumerable
so a wrapper built by copying own properties does not inherit a decision its
author never made, read with Object.hasOwn. This is the exception's one open
application.

The rest become run-scoped.useSegmentCauses(), usePropsCompiler() and
useParseCompiler() are installed where the execution begins and reclaimed with
it. DocumentationError's constructor cannot reach a scope, so reading the
cause moved to a documentationError() builder that runs before it — the cause
is still attached before any observer can see the failure. Expansion driven
directly (a test, a tool describing a document) has no execution around it, so
the outermost expandSegments opens the table for exactly its own lifetime, and
compiling outside a run gets an instance that lives as long as the call.

The two compile caches go rather than move. Ajv memoizes by schema object
within a run already, so a per-run instance is the whole cache. A second table
beside it would only reintroduce the question of which root contract a
remembered validator was compiled under.

Why the Ajv instances count as state

In ajv@8.20.0, _cache is a plain Map and _addSchema does

letsch=this._cache.get(schema);if(sch!==undefined)returnsch;this._cache.set(sch.schema,sch);if(addSchema&&!baseId.startsWith("#")){}

The set is unconditional and precedes the addUsedSchema guard the engine
already sets to false. A module-scoped instance therefore holds a strong
reference to every schema object any run ever compiled, for the life of the
process — and because the key is object identity, it answers a schema object
mutated between runs with the first run's validator. That is not a leak in the
abstract: SO13 demonstrates it through public api alone (a host registers a
component, tightens its props schema, runs again — and the second run accepts
props the schema no longer allows).

The parse path is different and the PR says so: it normalizes its declaration
through parseJson, handing Ajv a fresh object every call, so it never hits the
identity cache. Its harm is unbounded growth rather than a wrong answer, which
is why SO9 asserts the lifetime rather than a stale validator.

The lint rule

local/no-module-scoped-registry (ported from #312's 0673f7d, its
documentation reconciled with the exception this PR applies) reports a Map,
Set, WeakMap or WeakSet built at module scope — declared, exported,
assigned later, held inside another module-scoped value, or a static class
field — with the remedy "create it inside the operation that owns it and provide
it via context." It accepts a table built from its own contents (a constant), an
instance field, and a table handed straight to a call.

Before the conversions it reported 4 of the 5 sites
(component-failures.ts:27, errors.ts:63, validate.ts:85, validate.ts:86).
After them it reports none, and deno task lint is 0 errors.

It does not catch a module-scoped new Ajv(…) — it matches collection
constructors, and the accumulation there is inside a library object rather than
a table this repository wrote. The architecture rule covers it anyway ("not
hidden inside library objects that accumulate"); the rule's own header now says
so, and a reviewer holds that half.

How to verify it

packages/core/tests/state-ownership.test.ts — Tier SO, 13 tests.

SO13 is red on origin/main (verified at f413545, in a throwaway worktree,
using only registerComponents + execute): main renders widget:two where
the schema now requires b. Every other Tier SO test names api this PR
introduces, so "red on main" would only mean the module does not import — no
evidence at all. They are discriminated by mutation instead. All seven were run,
and each reddens exactly the tests that claim its behavior:

MutationReddens
the declaration key is Symbol.forSO4
the declaration is enumerableSO2
the cause table is one per processSO5, SO6
the props compiler is one per processSO8, SO11, SO13
useParseCompiler hands out one shared instanceSO9
a compile cache beside Ajv comes backSO8, SO11, SO13
a fresh compiler per call, even inside a runSO10

Two earlier attempts at these tests reddened under no mutation and were
rewritten rather than kept: SO2 asserted Object.keys, which never lists a
symbol key whatever its enumerability, and SO9 asserted a stale validator on the
path that clones its declaration. SO1, SO3, SO7 and SO12 are ordinary
behavior pins with no mutation of their own.

scripts/tests/no-module-scoped-registry.test.ts covers the rule against both
fixtures.

Breaking

Six published functions become operations. A caller writes yield* where it
previously called; nothing else about any of them changes.

  • compilePropsSchema, compileReturnsSchema, validateProps,
    validateReturnValue — they reach the run's compiler.
  • parseMarkdownDefinition — it compiles the schemas it parses.
  • prepareElicitation, elicit — they compile the question's schema.

compileParseSchema is internal and changes the same way. The use* installers
are deliberately not exported: execute() installs them, direct expansion
opens what it needs, and a call outside a run gets its own instance — so no host
has to learn about them.

A generator conversion has a silent failure mode worth knowing about in
review: a discarded call (compilePropsSchema(props); as a statement) type-checks
and then validates nothing, because nothing iterates it. Every such site was
converted — definition.ts, registration.ts, execute.ts, and the
expect(() => …).toThrow(…) assertions across five test files, which would
otherwise have gone quietly green.

Scope

Included

  • The five conversions, the lint rule, and Tier SO.
  • The mechanical yield* at every call site, including tests.

Intentionally unchanged

  • <Retry>, <Result as>, suspension and the error middleware Js api stay
    defined and unbuilt. No semantics change and no vocabulary change.
  • packages/web already builds a fresh Ajv per call via createServerAjv(), so
    it needed nothing.
  • The remaining module-scoped Sets in packages/ (EACH_PROPS,
    RESERVED_STRUCTURAL, the secret-scanner word lists) are constants built from
    their own contents. The rule accepts them by design.

Verification

GateResult
deno task lint0 errors, formatting clean
deno task check0 errors
deno task test349 passed, 0 failed
deno task check:jsrSuccess Dry run complete
pnpm exec tsc --project tsconfig.node.json --noEmitclean
compiled-binary smokepass — main suite, value root, -e '<Badge />', test-agent worker, <WebForm> preflight

Test counts: 344 → 349 passed, 2352 → 2367 steps. The delta is exactly the
new tests — Tier SO's 4 suites (13 steps) and the rule's 1 suite (2 steps).
Nothing else moved.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

architecture.md: "All state is scoped to the operation that owns it, so it
is torn down when the operation is torn down: created inside the run it
describes, provided via context. No module-scoped registries — not as
collections, not hidden inside library objects that accumulate."
Five declarations in packages/core were on the wrong side of that.
The `printErrors(fn)` mark takes the rule's one exception: it is declared
at module evaluation about a function the author owns, so it moves onto
that function under a module-private Symbol rather than into a table.
The segment-cause table and both Ajv instances become run-scoped, provided
via context and reclaimed with the run. The two compile caches beside Ajv
go: Ajv memoizes by schema object within a run, so a per-run instance is
the whole cache — and a shared one answered a schema object mutated
between runs with the first run's validator.
`local/no-module-scoped-registry` reports the shape from now on.
Closes#323.
@github-actions

Copy link
Copy Markdown

PR #325: 💥 Scope engine state to the operation that owns it

28 files, +979 / -200

Scope

🔴 PR has 1179 lines changed. Split into focused PRs.

🟡 1179 lines changed. PRs under 400 receive more thorough review.

🟡 28 files changed. Are all changes related?

🟡 PR mixes config and source changes.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras merged commit 7d7bdf2 into mainAug 4, 2026
10 checks passed
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 10, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 12, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 14, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 22, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 24, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
@taras
taras deleted the feat/operation-scoped-state branch August 27, 2026 01:34
Sign up for freeto 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.

💥 Scope engine state to the operation that owns it

1 participant

@taras
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

💥 Scope engine state to the operation that owns it - #325

Merged
taras merged 1 commit into
mainfrom
feat/operation-scoped-state
Aug 4, 2026
Merged

💥 Scope engine state to the operation that owns it#325
taras merged 1 commit into
mainfrom
feat/operation-scoped-state

Conversation

@taras

@tarastaras commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closes#323. Carries out architecture.md's State ownership rule (#314).

Why

All state is scoped to the operation that owns it, so it is torn down when the
operation is torn down: created inside the run it describes, provided via
context. No module-scoped registries — not as collections, not hidden inside
library objects that accumulate. One exception: metadata an author declares at
module evaluation, about a value the author owns, may live on that value.

Five declarations in packages/core were on the wrong side of it. Each was one
table per process, shared by every run, that nothing in a caller's scope could
see, override, or clear.

What changes

SiteBeforeAfter
component-failures.tsprinting WeakSeta module-private Symbol on the function
errors.tssegmentCauses WeakMapSegmentCauses, opened per run
validate.tsmodule Ajv + two compile cachesPropsCompiler, opened per run; caches gone
components/parse-schema.tsmodule AjvParseCompiler, opened per run

The printErrors(fn) mark takes the exception, not context. It runs while a
component module is evaluated — outside any operation, with no run to own a
table and no scope to reach — and records what an author declared about a
function the author owns. So it lives on that function: a module-private
Symbol() (not Symbol.for, which anyone could forge), defined non-enumerable
so a wrapper built by copying own properties does not inherit a decision its
author never made, read with Object.hasOwn. This is the exception's one open
application.

The rest become run-scoped.useSegmentCauses(), usePropsCompiler() and
useParseCompiler() are installed where the execution begins and reclaimed with
it. DocumentationError's constructor cannot reach a scope, so reading the
cause moved to a documentationError() builder that runs before it — the cause
is still attached before any observer can see the failure. Expansion driven
directly (a test, a tool describing a document) has no execution around it, so
the outermost expandSegments opens the table for exactly its own lifetime, and
compiling outside a run gets an instance that lives as long as the call.

The two compile caches go rather than move. Ajv memoizes by schema object
within a run already, so a per-run instance is the whole cache. A second table
beside it would only reintroduce the question of which root contract a
remembered validator was compiled under.

Why the Ajv instances count as state

In ajv@8.20.0, _cache is a plain Map and _addSchema does

letsch=this._cache.get(schema);if(sch!==undefined)returnsch;this._cache.set(sch.schema,sch);if(addSchema&&!baseId.startsWith("#")){}

The set is unconditional and precedes the addUsedSchema guard the engine
already sets to false. A module-scoped instance therefore holds a strong
reference to every schema object any run ever compiled, for the life of the
process — and because the key is object identity, it answers a schema object
mutated between runs with the first run's validator. That is not a leak in the
abstract: SO13 demonstrates it through public api alone (a host registers a
component, tightens its props schema, runs again — and the second run accepts
props the schema no longer allows).

The parse path is different and the PR says so: it normalizes its declaration
through parseJson, handing Ajv a fresh object every call, so it never hits the
identity cache. Its harm is unbounded growth rather than a wrong answer, which
is why SO9 asserts the lifetime rather than a stale validator.

The lint rule

local/no-module-scoped-registry (ported from #312's 0673f7d, its
documentation reconciled with the exception this PR applies) reports a Map,
Set, WeakMap or WeakSet built at module scope — declared, exported,
assigned later, held inside another module-scoped value, or a static class
field — with the remedy "create it inside the operation that owns it and provide
it via context." It accepts a table built from its own contents (a constant), an
instance field, and a table handed straight to a call.

Before the conversions it reported 4 of the 5 sites
(component-failures.ts:27, errors.ts:63, validate.ts:85, validate.ts:86).
After them it reports none, and deno task lint is 0 errors.

It does not catch a module-scoped new Ajv(…) — it matches collection
constructors, and the accumulation there is inside a library object rather than
a table this repository wrote. The architecture rule covers it anyway ("not
hidden inside library objects that accumulate"); the rule's own header now says
so, and a reviewer holds that half.

How to verify it

packages/core/tests/state-ownership.test.ts — Tier SO, 13 tests.

SO13 is red on origin/main (verified at f413545, in a throwaway worktree,
using only registerComponents + execute): main renders widget:two where
the schema now requires b. Every other Tier SO test names api this PR
introduces, so "red on main" would only mean the module does not import — no
evidence at all. They are discriminated by mutation instead. All seven were run,
and each reddens exactly the tests that claim its behavior:

MutationReddens
the declaration key is Symbol.forSO4
the declaration is enumerableSO2
the cause table is one per processSO5, SO6
the props compiler is one per processSO8, SO11, SO13
useParseCompiler hands out one shared instanceSO9
a compile cache beside Ajv comes backSO8, SO11, SO13
a fresh compiler per call, even inside a runSO10

Two earlier attempts at these tests reddened under no mutation and were
rewritten rather than kept: SO2 asserted Object.keys, which never lists a
symbol key whatever its enumerability, and SO9 asserted a stale validator on the
path that clones its declaration. SO1, SO3, SO7 and SO12 are ordinary
behavior pins with no mutation of their own.

scripts/tests/no-module-scoped-registry.test.ts covers the rule against both
fixtures.

Breaking

Six published functions become operations. A caller writes yield* where it
previously called; nothing else about any of them changes.

  • compilePropsSchema, compileReturnsSchema, validateProps,
    validateReturnValue — they reach the run's compiler.
  • parseMarkdownDefinition — it compiles the schemas it parses.
  • prepareElicitation, elicit — they compile the question's schema.

compileParseSchema is internal and changes the same way. The use* installers
are deliberately not exported: execute() installs them, direct expansion
opens what it needs, and a call outside a run gets its own instance — so no host
has to learn about them.

A generator conversion has a silent failure mode worth knowing about in
review: a discarded call (compilePropsSchema(props); as a statement) type-checks
and then validates nothing, because nothing iterates it. Every such site was
converted — definition.ts, registration.ts, execute.ts, and the
expect(() => …).toThrow(…) assertions across five test files, which would
otherwise have gone quietly green.

Scope

Included

  • The five conversions, the lint rule, and Tier SO.
  • The mechanical yield* at every call site, including tests.

Intentionally unchanged

  • <Retry>, <Result as>, suspension and the error middleware Js api stay
    defined and unbuilt. No semantics change and no vocabulary change.
  • packages/web already builds a fresh Ajv per call via createServerAjv(), so
    it needed nothing.
  • The remaining module-scoped Sets in packages/ (EACH_PROPS,
    RESERVED_STRUCTURAL, the secret-scanner word lists) are constants built from
    their own contents. The rule accepts them by design.

Verification

GateResult
deno task lint0 errors, formatting clean
deno task check0 errors
deno task test349 passed, 0 failed
deno task check:jsrSuccess Dry run complete
pnpm exec tsc --project tsconfig.node.json --noEmitclean
compiled-binary smokepass — main suite, value root, -e '<Badge />', test-agent worker, <WebForm> preflight

Test counts: 344 → 349 passed, 2352 → 2367 steps. The delta is exactly the
new tests — Tier SO's 4 suites (13 steps) and the rule's 1 suite (2 steps).
Nothing else moved.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

architecture.md: "All state is scoped to the operation that owns it, so it
is torn down when the operation is torn down: created inside the run it
describes, provided via context. No module-scoped registries — not as
collections, not hidden inside library objects that accumulate."
Five declarations in packages/core were on the wrong side of that.
The `printErrors(fn)` mark takes the rule's one exception: it is declared
at module evaluation about a function the author owns, so it moves onto
that function under a module-private Symbol rather than into a table.
The segment-cause table and both Ajv instances become run-scoped, provided
via context and reclaimed with the run. The two compile caches beside Ajv
go: Ajv memoizes by schema object within a run, so a per-run instance is
the whole cache — and a shared one answered a schema object mutated
between runs with the first run's validator.
`local/no-module-scoped-registry` reports the shape from now on.
Closes#323.
@github-actions

Copy link
Copy Markdown

PR #325: 💥 Scope engine state to the operation that owns it

28 files, +979 / -200

Scope

🔴 PR has 1179 lines changed. Split into focused PRs.

🟡 1179 lines changed. PRs under 400 receive more thorough review.

🟡 28 files changed. Are all changes related?

🟡 PR mixes config and source changes.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras merged commit 7d7bdf2 into mainAug 4, 2026
10 checks passed
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 10, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 12, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 14, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 22, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 24, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
@taras
taras deleted the feat/operation-scoped-state branch August 27, 2026 01:34
Sign up for freeto 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.

💥 Scope engine state to the operation that owns it

1 participant

@taras
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

💥 Scope engine state to the operation that owns it - #325

Merged
taras merged 1 commit into
mainfrom
feat/operation-scoped-state
Aug 4, 2026
Merged

💥 Scope engine state to the operation that owns it#325
taras merged 1 commit into
mainfrom
feat/operation-scoped-state

Conversation

@taras

@tarastaras commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closes#323. Carries out architecture.md's State ownership rule (#314).

Why

All state is scoped to the operation that owns it, so it is torn down when the
operation is torn down: created inside the run it describes, provided via
context. No module-scoped registries — not as collections, not hidden inside
library objects that accumulate. One exception: metadata an author declares at
module evaluation, about a value the author owns, may live on that value.

Five declarations in packages/core were on the wrong side of it. Each was one
table per process, shared by every run, that nothing in a caller's scope could
see, override, or clear.

What changes

SiteBeforeAfter
component-failures.tsprinting WeakSeta module-private Symbol on the function
errors.tssegmentCauses WeakMapSegmentCauses, opened per run
validate.tsmodule Ajv + two compile cachesPropsCompiler, opened per run; caches gone
components/parse-schema.tsmodule AjvParseCompiler, opened per run

The printErrors(fn) mark takes the exception, not context. It runs while a
component module is evaluated — outside any operation, with no run to own a
table and no scope to reach — and records what an author declared about a
function the author owns. So it lives on that function: a module-private
Symbol() (not Symbol.for, which anyone could forge), defined non-enumerable
so a wrapper built by copying own properties does not inherit a decision its
author never made, read with Object.hasOwn. This is the exception's one open
application.

The rest become run-scoped.useSegmentCauses(), usePropsCompiler() and
useParseCompiler() are installed where the execution begins and reclaimed with
it. DocumentationError's constructor cannot reach a scope, so reading the
cause moved to a documentationError() builder that runs before it — the cause
is still attached before any observer can see the failure. Expansion driven
directly (a test, a tool describing a document) has no execution around it, so
the outermost expandSegments opens the table for exactly its own lifetime, and
compiling outside a run gets an instance that lives as long as the call.

The two compile caches go rather than move. Ajv memoizes by schema object
within a run already, so a per-run instance is the whole cache. A second table
beside it would only reintroduce the question of which root contract a
remembered validator was compiled under.

Why the Ajv instances count as state

In ajv@8.20.0, _cache is a plain Map and _addSchema does

letsch=this._cache.get(schema);if(sch!==undefined)returnsch;this._cache.set(sch.schema,sch);if(addSchema&&!baseId.startsWith("#")){}

The set is unconditional and precedes the addUsedSchema guard the engine
already sets to false. A module-scoped instance therefore holds a strong
reference to every schema object any run ever compiled, for the life of the
process — and because the key is object identity, it answers a schema object
mutated between runs with the first run's validator. That is not a leak in the
abstract: SO13 demonstrates it through public api alone (a host registers a
component, tightens its props schema, runs again — and the second run accepts
props the schema no longer allows).

The parse path is different and the PR says so: it normalizes its declaration
through parseJson, handing Ajv a fresh object every call, so it never hits the
identity cache. Its harm is unbounded growth rather than a wrong answer, which
is why SO9 asserts the lifetime rather than a stale validator.

The lint rule

local/no-module-scoped-registry (ported from #312's 0673f7d, its
documentation reconciled with the exception this PR applies) reports a Map,
Set, WeakMap or WeakSet built at module scope — declared, exported,
assigned later, held inside another module-scoped value, or a static class
field — with the remedy "create it inside the operation that owns it and provide
it via context." It accepts a table built from its own contents (a constant), an
instance field, and a table handed straight to a call.

Before the conversions it reported 4 of the 5 sites
(component-failures.ts:27, errors.ts:63, validate.ts:85, validate.ts:86).
After them it reports none, and deno task lint is 0 errors.

It does not catch a module-scoped new Ajv(…) — it matches collection
constructors, and the accumulation there is inside a library object rather than
a table this repository wrote. The architecture rule covers it anyway ("not
hidden inside library objects that accumulate"); the rule's own header now says
so, and a reviewer holds that half.

How to verify it

packages/core/tests/state-ownership.test.ts — Tier SO, 13 tests.

SO13 is red on origin/main (verified at f413545, in a throwaway worktree,
using only registerComponents + execute): main renders widget:two where
the schema now requires b. Every other Tier SO test names api this PR
introduces, so "red on main" would only mean the module does not import — no
evidence at all. They are discriminated by mutation instead. All seven were run,
and each reddens exactly the tests that claim its behavior:

MutationReddens
the declaration key is Symbol.forSO4
the declaration is enumerableSO2
the cause table is one per processSO5, SO6
the props compiler is one per processSO8, SO11, SO13
useParseCompiler hands out one shared instanceSO9
a compile cache beside Ajv comes backSO8, SO11, SO13
a fresh compiler per call, even inside a runSO10

Two earlier attempts at these tests reddened under no mutation and were
rewritten rather than kept: SO2 asserted Object.keys, which never lists a
symbol key whatever its enumerability, and SO9 asserted a stale validator on the
path that clones its declaration. SO1, SO3, SO7 and SO12 are ordinary
behavior pins with no mutation of their own.

scripts/tests/no-module-scoped-registry.test.ts covers the rule against both
fixtures.

Breaking

Six published functions become operations. A caller writes yield* where it
previously called; nothing else about any of them changes.

  • compilePropsSchema, compileReturnsSchema, validateProps,
    validateReturnValue — they reach the run's compiler.
  • parseMarkdownDefinition — it compiles the schemas it parses.
  • prepareElicitation, elicit — they compile the question's schema.

compileParseSchema is internal and changes the same way. The use* installers
are deliberately not exported: execute() installs them, direct expansion
opens what it needs, and a call outside a run gets its own instance — so no host
has to learn about them.

A generator conversion has a silent failure mode worth knowing about in
review: a discarded call (compilePropsSchema(props); as a statement) type-checks
and then validates nothing, because nothing iterates it. Every such site was
converted — definition.ts, registration.ts, execute.ts, and the
expect(() => …).toThrow(…) assertions across five test files, which would
otherwise have gone quietly green.

Scope

Included

  • The five conversions, the lint rule, and Tier SO.
  • The mechanical yield* at every call site, including tests.

Intentionally unchanged

  • <Retry>, <Result as>, suspension and the error middleware Js api stay
    defined and unbuilt. No semantics change and no vocabulary change.
  • packages/web already builds a fresh Ajv per call via createServerAjv(), so
    it needed nothing.
  • The remaining module-scoped Sets in packages/ (EACH_PROPS,
    RESERVED_STRUCTURAL, the secret-scanner word lists) are constants built from
    their own contents. The rule accepts them by design.

Verification

GateResult
deno task lint0 errors, formatting clean
deno task check0 errors
deno task test349 passed, 0 failed
deno task check:jsrSuccess Dry run complete
pnpm exec tsc --project tsconfig.node.json --noEmitclean
compiled-binary smokepass — main suite, value root, -e '<Badge />', test-agent worker, <WebForm> preflight

Test counts: 344 → 349 passed, 2352 → 2367 steps. The delta is exactly the
new tests — Tier SO's 4 suites (13 steps) and the rule's 1 suite (2 steps).
Nothing else moved.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

architecture.md: "All state is scoped to the operation that owns it, so it
is torn down when the operation is torn down: created inside the run it
describes, provided via context. No module-scoped registries — not as
collections, not hidden inside library objects that accumulate."
Five declarations in packages/core were on the wrong side of that.
The `printErrors(fn)` mark takes the rule's one exception: it is declared
at module evaluation about a function the author owns, so it moves onto
that function under a module-private Symbol rather than into a table.
The segment-cause table and both Ajv instances become run-scoped, provided
via context and reclaimed with the run. The two compile caches beside Ajv
go: Ajv memoizes by schema object within a run, so a per-run instance is
the whole cache — and a shared one answered a schema object mutated
between runs with the first run's validator.
`local/no-module-scoped-registry` reports the shape from now on.
Closes#323.
@github-actions

Copy link
Copy Markdown

PR #325: 💥 Scope engine state to the operation that owns it

28 files, +979 / -200

Scope

🔴 PR has 1179 lines changed. Split into focused PRs.

🟡 1179 lines changed. PRs under 400 receive more thorough review.

🟡 28 files changed. Are all changes related?

🟡 PR mixes config and source changes.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras merged commit 7d7bdf2 into mainAug 4, 2026
10 checks passed
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 10, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 12, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 14, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 22, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 24, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
@taras
taras deleted the feat/operation-scoped-state branch August 27, 2026 01:34
Sign up for freeto 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.

💥 Scope engine state to the operation that owns it

1 participant

@taras
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

💥 Scope engine state to the operation that owns it - #325

Merged
taras merged 1 commit into
mainfrom
feat/operation-scoped-state
Aug 4, 2026
Merged

💥 Scope engine state to the operation that owns it#325
taras merged 1 commit into
mainfrom
feat/operation-scoped-state

Conversation

@taras

@tarastaras commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closes#323. Carries out architecture.md's State ownership rule (#314).

Why

All state is scoped to the operation that owns it, so it is torn down when the
operation is torn down: created inside the run it describes, provided via
context. No module-scoped registries — not as collections, not hidden inside
library objects that accumulate. One exception: metadata an author declares at
module evaluation, about a value the author owns, may live on that value.

Five declarations in packages/core were on the wrong side of it. Each was one
table per process, shared by every run, that nothing in a caller's scope could
see, override, or clear.

What changes

SiteBeforeAfter
component-failures.tsprinting WeakSeta module-private Symbol on the function
errors.tssegmentCauses WeakMapSegmentCauses, opened per run
validate.tsmodule Ajv + two compile cachesPropsCompiler, opened per run; caches gone
components/parse-schema.tsmodule AjvParseCompiler, opened per run

The printErrors(fn) mark takes the exception, not context. It runs while a
component module is evaluated — outside any operation, with no run to own a
table and no scope to reach — and records what an author declared about a
function the author owns. So it lives on that function: a module-private
Symbol() (not Symbol.for, which anyone could forge), defined non-enumerable
so a wrapper built by copying own properties does not inherit a decision its
author never made, read with Object.hasOwn. This is the exception's one open
application.

The rest become run-scoped.useSegmentCauses(), usePropsCompiler() and
useParseCompiler() are installed where the execution begins and reclaimed with
it. DocumentationError's constructor cannot reach a scope, so reading the
cause moved to a documentationError() builder that runs before it — the cause
is still attached before any observer can see the failure. Expansion driven
directly (a test, a tool describing a document) has no execution around it, so
the outermost expandSegments opens the table for exactly its own lifetime, and
compiling outside a run gets an instance that lives as long as the call.

The two compile caches go rather than move. Ajv memoizes by schema object
within a run already, so a per-run instance is the whole cache. A second table
beside it would only reintroduce the question of which root contract a
remembered validator was compiled under.

Why the Ajv instances count as state

In ajv@8.20.0, _cache is a plain Map and _addSchema does

letsch=this._cache.get(schema);if(sch!==undefined)returnsch;this._cache.set(sch.schema,sch);if(addSchema&&!baseId.startsWith("#")){}

The set is unconditional and precedes the addUsedSchema guard the engine
already sets to false. A module-scoped instance therefore holds a strong
reference to every schema object any run ever compiled, for the life of the
process — and because the key is object identity, it answers a schema object
mutated between runs with the first run's validator. That is not a leak in the
abstract: SO13 demonstrates it through public api alone (a host registers a
component, tightens its props schema, runs again — and the second run accepts
props the schema no longer allows).

The parse path is different and the PR says so: it normalizes its declaration
through parseJson, handing Ajv a fresh object every call, so it never hits the
identity cache. Its harm is unbounded growth rather than a wrong answer, which
is why SO9 asserts the lifetime rather than a stale validator.

The lint rule

local/no-module-scoped-registry (ported from #312's 0673f7d, its
documentation reconciled with the exception this PR applies) reports a Map,
Set, WeakMap or WeakSet built at module scope — declared, exported,
assigned later, held inside another module-scoped value, or a static class
field — with the remedy "create it inside the operation that owns it and provide
it via context." It accepts a table built from its own contents (a constant), an
instance field, and a table handed straight to a call.

Before the conversions it reported 4 of the 5 sites
(component-failures.ts:27, errors.ts:63, validate.ts:85, validate.ts:86).
After them it reports none, and deno task lint is 0 errors.

It does not catch a module-scoped new Ajv(…) — it matches collection
constructors, and the accumulation there is inside a library object rather than
a table this repository wrote. The architecture rule covers it anyway ("not
hidden inside library objects that accumulate"); the rule's own header now says
so, and a reviewer holds that half.

How to verify it

packages/core/tests/state-ownership.test.ts — Tier SO, 13 tests.

SO13 is red on origin/main (verified at f413545, in a throwaway worktree,
using only registerComponents + execute): main renders widget:two where
the schema now requires b. Every other Tier SO test names api this PR
introduces, so "red on main" would only mean the module does not import — no
evidence at all. They are discriminated by mutation instead. All seven were run,
and each reddens exactly the tests that claim its behavior:

MutationReddens
the declaration key is Symbol.forSO4
the declaration is enumerableSO2
the cause table is one per processSO5, SO6
the props compiler is one per processSO8, SO11, SO13
useParseCompiler hands out one shared instanceSO9
a compile cache beside Ajv comes backSO8, SO11, SO13
a fresh compiler per call, even inside a runSO10

Two earlier attempts at these tests reddened under no mutation and were
rewritten rather than kept: SO2 asserted Object.keys, which never lists a
symbol key whatever its enumerability, and SO9 asserted a stale validator on the
path that clones its declaration. SO1, SO3, SO7 and SO12 are ordinary
behavior pins with no mutation of their own.

scripts/tests/no-module-scoped-registry.test.ts covers the rule against both
fixtures.

Breaking

Six published functions become operations. A caller writes yield* where it
previously called; nothing else about any of them changes.

  • compilePropsSchema, compileReturnsSchema, validateProps,
    validateReturnValue — they reach the run's compiler.
  • parseMarkdownDefinition — it compiles the schemas it parses.
  • prepareElicitation, elicit — they compile the question's schema.

compileParseSchema is internal and changes the same way. The use* installers
are deliberately not exported: execute() installs them, direct expansion
opens what it needs, and a call outside a run gets its own instance — so no host
has to learn about them.

A generator conversion has a silent failure mode worth knowing about in
review: a discarded call (compilePropsSchema(props); as a statement) type-checks
and then validates nothing, because nothing iterates it. Every such site was
converted — definition.ts, registration.ts, execute.ts, and the
expect(() => …).toThrow(…) assertions across five test files, which would
otherwise have gone quietly green.

Scope

Included

  • The five conversions, the lint rule, and Tier SO.
  • The mechanical yield* at every call site, including tests.

Intentionally unchanged

  • <Retry>, <Result as>, suspension and the error middleware Js api stay
    defined and unbuilt. No semantics change and no vocabulary change.
  • packages/web already builds a fresh Ajv per call via createServerAjv(), so
    it needed nothing.
  • The remaining module-scoped Sets in packages/ (EACH_PROPS,
    RESERVED_STRUCTURAL, the secret-scanner word lists) are constants built from
    their own contents. The rule accepts them by design.

Verification

GateResult
deno task lint0 errors, formatting clean
deno task check0 errors
deno task test349 passed, 0 failed
deno task check:jsrSuccess Dry run complete
pnpm exec tsc --project tsconfig.node.json --noEmitclean
compiled-binary smokepass — main suite, value root, -e '<Badge />', test-agent worker, <WebForm> preflight

Test counts: 344 → 349 passed, 2352 → 2367 steps. The delta is exactly the
new tests — Tier SO's 4 suites (13 steps) and the rule's 1 suite (2 steps).
Nothing else moved.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

architecture.md: "All state is scoped to the operation that owns it, so it
is torn down when the operation is torn down: created inside the run it
describes, provided via context. No module-scoped registries — not as
collections, not hidden inside library objects that accumulate."
Five declarations in packages/core were on the wrong side of that.
The `printErrors(fn)` mark takes the rule's one exception: it is declared
at module evaluation about a function the author owns, so it moves onto
that function under a module-private Symbol rather than into a table.
The segment-cause table and both Ajv instances become run-scoped, provided
via context and reclaimed with the run. The two compile caches beside Ajv
go: Ajv memoizes by schema object within a run, so a per-run instance is
the whole cache — and a shared one answered a schema object mutated
between runs with the first run's validator.
`local/no-module-scoped-registry` reports the shape from now on.
Closes#323.
@github-actions

Copy link
Copy Markdown

PR #325: 💥 Scope engine state to the operation that owns it

28 files, +979 / -200

Scope

🔴 PR has 1179 lines changed. Split into focused PRs.

🟡 1179 lines changed. PRs under 400 receive more thorough review.

🟡 28 files changed. Are all changes related?

🟡 PR mixes config and source changes.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras merged commit 7d7bdf2 into mainAug 4, 2026
10 checks passed
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 10, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 12, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 14, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 22, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 24, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
@taras
taras deleted the feat/operation-scoped-state branch August 27, 2026 01:34
Sign up for freeto 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.

💥 Scope engine state to the operation that owns it

1 participant

@taras
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

💥 Scope engine state to the operation that owns it - #325

Merged
taras merged 1 commit into
mainfrom
feat/operation-scoped-state
Aug 4, 2026
Merged

💥 Scope engine state to the operation that owns it#325
taras merged 1 commit into
mainfrom
feat/operation-scoped-state

Conversation

@taras

@tarastaras commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closes#323. Carries out architecture.md's State ownership rule (#314).

Why

All state is scoped to the operation that owns it, so it is torn down when the
operation is torn down: created inside the run it describes, provided via
context. No module-scoped registries — not as collections, not hidden inside
library objects that accumulate. One exception: metadata an author declares at
module evaluation, about a value the author owns, may live on that value.

Five declarations in packages/core were on the wrong side of it. Each was one
table per process, shared by every run, that nothing in a caller's scope could
see, override, or clear.

What changes

SiteBeforeAfter
component-failures.tsprinting WeakSeta module-private Symbol on the function
errors.tssegmentCauses WeakMapSegmentCauses, opened per run
validate.tsmodule Ajv + two compile cachesPropsCompiler, opened per run; caches gone
components/parse-schema.tsmodule AjvParseCompiler, opened per run

The printErrors(fn) mark takes the exception, not context. It runs while a
component module is evaluated — outside any operation, with no run to own a
table and no scope to reach — and records what an author declared about a
function the author owns. So it lives on that function: a module-private
Symbol() (not Symbol.for, which anyone could forge), defined non-enumerable
so a wrapper built by copying own properties does not inherit a decision its
author never made, read with Object.hasOwn. This is the exception's one open
application.

The rest become run-scoped.useSegmentCauses(), usePropsCompiler() and
useParseCompiler() are installed where the execution begins and reclaimed with
it. DocumentationError's constructor cannot reach a scope, so reading the
cause moved to a documentationError() builder that runs before it — the cause
is still attached before any observer can see the failure. Expansion driven
directly (a test, a tool describing a document) has no execution around it, so
the outermost expandSegments opens the table for exactly its own lifetime, and
compiling outside a run gets an instance that lives as long as the call.

The two compile caches go rather than move. Ajv memoizes by schema object
within a run already, so a per-run instance is the whole cache. A second table
beside it would only reintroduce the question of which root contract a
remembered validator was compiled under.

Why the Ajv instances count as state

In ajv@8.20.0, _cache is a plain Map and _addSchema does

letsch=this._cache.get(schema);if(sch!==undefined)returnsch;this._cache.set(sch.schema,sch);if(addSchema&&!baseId.startsWith("#")){}

The set is unconditional and precedes the addUsedSchema guard the engine
already sets to false. A module-scoped instance therefore holds a strong
reference to every schema object any run ever compiled, for the life of the
process — and because the key is object identity, it answers a schema object
mutated between runs with the first run's validator. That is not a leak in the
abstract: SO13 demonstrates it through public api alone (a host registers a
component, tightens its props schema, runs again — and the second run accepts
props the schema no longer allows).

The parse path is different and the PR says so: it normalizes its declaration
through parseJson, handing Ajv a fresh object every call, so it never hits the
identity cache. Its harm is unbounded growth rather than a wrong answer, which
is why SO9 asserts the lifetime rather than a stale validator.

The lint rule

local/no-module-scoped-registry (ported from #312's 0673f7d, its
documentation reconciled with the exception this PR applies) reports a Map,
Set, WeakMap or WeakSet built at module scope — declared, exported,
assigned later, held inside another module-scoped value, or a static class
field — with the remedy "create it inside the operation that owns it and provide
it via context." It accepts a table built from its own contents (a constant), an
instance field, and a table handed straight to a call.

Before the conversions it reported 4 of the 5 sites
(component-failures.ts:27, errors.ts:63, validate.ts:85, validate.ts:86).
After them it reports none, and deno task lint is 0 errors.

It does not catch a module-scoped new Ajv(…) — it matches collection
constructors, and the accumulation there is inside a library object rather than
a table this repository wrote. The architecture rule covers it anyway ("not
hidden inside library objects that accumulate"); the rule's own header now says
so, and a reviewer holds that half.

How to verify it

packages/core/tests/state-ownership.test.ts — Tier SO, 13 tests.

SO13 is red on origin/main (verified at f413545, in a throwaway worktree,
using only registerComponents + execute): main renders widget:two where
the schema now requires b. Every other Tier SO test names api this PR
introduces, so "red on main" would only mean the module does not import — no
evidence at all. They are discriminated by mutation instead. All seven were run,
and each reddens exactly the tests that claim its behavior:

MutationReddens
the declaration key is Symbol.forSO4
the declaration is enumerableSO2
the cause table is one per processSO5, SO6
the props compiler is one per processSO8, SO11, SO13
useParseCompiler hands out one shared instanceSO9
a compile cache beside Ajv comes backSO8, SO11, SO13
a fresh compiler per call, even inside a runSO10

Two earlier attempts at these tests reddened under no mutation and were
rewritten rather than kept: SO2 asserted Object.keys, which never lists a
symbol key whatever its enumerability, and SO9 asserted a stale validator on the
path that clones its declaration. SO1, SO3, SO7 and SO12 are ordinary
behavior pins with no mutation of their own.

scripts/tests/no-module-scoped-registry.test.ts covers the rule against both
fixtures.

Breaking

Six published functions become operations. A caller writes yield* where it
previously called; nothing else about any of them changes.

  • compilePropsSchema, compileReturnsSchema, validateProps,
    validateReturnValue — they reach the run's compiler.
  • parseMarkdownDefinition — it compiles the schemas it parses.
  • prepareElicitation, elicit — they compile the question's schema.

compileParseSchema is internal and changes the same way. The use* installers
are deliberately not exported: execute() installs them, direct expansion
opens what it needs, and a call outside a run gets its own instance — so no host
has to learn about them.

A generator conversion has a silent failure mode worth knowing about in
review: a discarded call (compilePropsSchema(props); as a statement) type-checks
and then validates nothing, because nothing iterates it. Every such site was
converted — definition.ts, registration.ts, execute.ts, and the
expect(() => …).toThrow(…) assertions across five test files, which would
otherwise have gone quietly green.

Scope

Included

  • The five conversions, the lint rule, and Tier SO.
  • The mechanical yield* at every call site, including tests.

Intentionally unchanged

  • <Retry>, <Result as>, suspension and the error middleware Js api stay
    defined and unbuilt. No semantics change and no vocabulary change.
  • packages/web already builds a fresh Ajv per call via createServerAjv(), so
    it needed nothing.
  • The remaining module-scoped Sets in packages/ (EACH_PROPS,
    RESERVED_STRUCTURAL, the secret-scanner word lists) are constants built from
    their own contents. The rule accepts them by design.

Verification

GateResult
deno task lint0 errors, formatting clean
deno task check0 errors
deno task test349 passed, 0 failed
deno task check:jsrSuccess Dry run complete
pnpm exec tsc --project tsconfig.node.json --noEmitclean
compiled-binary smokepass — main suite, value root, -e '<Badge />', test-agent worker, <WebForm> preflight

Test counts: 344 → 349 passed, 2352 → 2367 steps. The delta is exactly the
new tests — Tier SO's 4 suites (13 steps) and the rule's 1 suite (2 steps).
Nothing else moved.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

architecture.md: "All state is scoped to the operation that owns it, so it
is torn down when the operation is torn down: created inside the run it
describes, provided via context. No module-scoped registries — not as
collections, not hidden inside library objects that accumulate."
Five declarations in packages/core were on the wrong side of that.
The `printErrors(fn)` mark takes the rule's one exception: it is declared
at module evaluation about a function the author owns, so it moves onto
that function under a module-private Symbol rather than into a table.
The segment-cause table and both Ajv instances become run-scoped, provided
via context and reclaimed with the run. The two compile caches beside Ajv
go: Ajv memoizes by schema object within a run, so a per-run instance is
the whole cache — and a shared one answered a schema object mutated
between runs with the first run's validator.
`local/no-module-scoped-registry` reports the shape from now on.
Closes#323.
@github-actions

Copy link
Copy Markdown

PR #325: 💥 Scope engine state to the operation that owns it

28 files, +979 / -200

Scope

🔴 PR has 1179 lines changed. Split into focused PRs.

🟡 1179 lines changed. PRs under 400 receive more thorough review.

🟡 28 files changed. Are all changes related?

🟡 PR mixes config and source changes.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras merged commit 7d7bdf2 into mainAug 4, 2026
10 checks passed
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 10, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 12, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 14, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 22, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 24, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
@taras
taras deleted the feat/operation-scoped-state branch August 27, 2026 01:34
Sign up for freeto 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.

💥 Scope engine state to the operation that owns it

1 participant

@taras
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

💥 Scope engine state to the operation that owns it - #325

Merged
taras merged 1 commit into
mainfrom
feat/operation-scoped-state
Aug 4, 2026
Merged

💥 Scope engine state to the operation that owns it#325
taras merged 1 commit into
mainfrom
feat/operation-scoped-state

Conversation

@taras

@tarastaras commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closes#323. Carries out architecture.md's State ownership rule (#314).

Why

All state is scoped to the operation that owns it, so it is torn down when the
operation is torn down: created inside the run it describes, provided via
context. No module-scoped registries — not as collections, not hidden inside
library objects that accumulate. One exception: metadata an author declares at
module evaluation, about a value the author owns, may live on that value.

Five declarations in packages/core were on the wrong side of it. Each was one
table per process, shared by every run, that nothing in a caller's scope could
see, override, or clear.

What changes

SiteBeforeAfter
component-failures.tsprinting WeakSeta module-private Symbol on the function
errors.tssegmentCauses WeakMapSegmentCauses, opened per run
validate.tsmodule Ajv + two compile cachesPropsCompiler, opened per run; caches gone
components/parse-schema.tsmodule AjvParseCompiler, opened per run

The printErrors(fn) mark takes the exception, not context. It runs while a
component module is evaluated — outside any operation, with no run to own a
table and no scope to reach — and records what an author declared about a
function the author owns. So it lives on that function: a module-private
Symbol() (not Symbol.for, which anyone could forge), defined non-enumerable
so a wrapper built by copying own properties does not inherit a decision its
author never made, read with Object.hasOwn. This is the exception's one open
application.

The rest become run-scoped.useSegmentCauses(), usePropsCompiler() and
useParseCompiler() are installed where the execution begins and reclaimed with
it. DocumentationError's constructor cannot reach a scope, so reading the
cause moved to a documentationError() builder that runs before it — the cause
is still attached before any observer can see the failure. Expansion driven
directly (a test, a tool describing a document) has no execution around it, so
the outermost expandSegments opens the table for exactly its own lifetime, and
compiling outside a run gets an instance that lives as long as the call.

The two compile caches go rather than move. Ajv memoizes by schema object
within a run already, so a per-run instance is the whole cache. A second table
beside it would only reintroduce the question of which root contract a
remembered validator was compiled under.

Why the Ajv instances count as state

In ajv@8.20.0, _cache is a plain Map and _addSchema does

letsch=this._cache.get(schema);if(sch!==undefined)returnsch;this._cache.set(sch.schema,sch);if(addSchema&&!baseId.startsWith("#")){}

The set is unconditional and precedes the addUsedSchema guard the engine
already sets to false. A module-scoped instance therefore holds a strong
reference to every schema object any run ever compiled, for the life of the
process — and because the key is object identity, it answers a schema object
mutated between runs with the first run's validator. That is not a leak in the
abstract: SO13 demonstrates it through public api alone (a host registers a
component, tightens its props schema, runs again — and the second run accepts
props the schema no longer allows).

The parse path is different and the PR says so: it normalizes its declaration
through parseJson, handing Ajv a fresh object every call, so it never hits the
identity cache. Its harm is unbounded growth rather than a wrong answer, which
is why SO9 asserts the lifetime rather than a stale validator.

The lint rule

local/no-module-scoped-registry (ported from #312's 0673f7d, its
documentation reconciled with the exception this PR applies) reports a Map,
Set, WeakMap or WeakSet built at module scope — declared, exported,
assigned later, held inside another module-scoped value, or a static class
field — with the remedy "create it inside the operation that owns it and provide
it via context." It accepts a table built from its own contents (a constant), an
instance field, and a table handed straight to a call.

Before the conversions it reported 4 of the 5 sites
(component-failures.ts:27, errors.ts:63, validate.ts:85, validate.ts:86).
After them it reports none, and deno task lint is 0 errors.

It does not catch a module-scoped new Ajv(…) — it matches collection
constructors, and the accumulation there is inside a library object rather than
a table this repository wrote. The architecture rule covers it anyway ("not
hidden inside library objects that accumulate"); the rule's own header now says
so, and a reviewer holds that half.

How to verify it

packages/core/tests/state-ownership.test.ts — Tier SO, 13 tests.

SO13 is red on origin/main (verified at f413545, in a throwaway worktree,
using only registerComponents + execute): main renders widget:two where
the schema now requires b. Every other Tier SO test names api this PR
introduces, so "red on main" would only mean the module does not import — no
evidence at all. They are discriminated by mutation instead. All seven were run,
and each reddens exactly the tests that claim its behavior:

MutationReddens
the declaration key is Symbol.forSO4
the declaration is enumerableSO2
the cause table is one per processSO5, SO6
the props compiler is one per processSO8, SO11, SO13
useParseCompiler hands out one shared instanceSO9
a compile cache beside Ajv comes backSO8, SO11, SO13
a fresh compiler per call, even inside a runSO10

Two earlier attempts at these tests reddened under no mutation and were
rewritten rather than kept: SO2 asserted Object.keys, which never lists a
symbol key whatever its enumerability, and SO9 asserted a stale validator on the
path that clones its declaration. SO1, SO3, SO7 and SO12 are ordinary
behavior pins with no mutation of their own.

scripts/tests/no-module-scoped-registry.test.ts covers the rule against both
fixtures.

Breaking

Six published functions become operations. A caller writes yield* where it
previously called; nothing else about any of them changes.

  • compilePropsSchema, compileReturnsSchema, validateProps,
    validateReturnValue — they reach the run's compiler.
  • parseMarkdownDefinition — it compiles the schemas it parses.
  • prepareElicitation, elicit — they compile the question's schema.

compileParseSchema is internal and changes the same way. The use* installers
are deliberately not exported: execute() installs them, direct expansion
opens what it needs, and a call outside a run gets its own instance — so no host
has to learn about them.

A generator conversion has a silent failure mode worth knowing about in
review: a discarded call (compilePropsSchema(props); as a statement) type-checks
and then validates nothing, because nothing iterates it. Every such site was
converted — definition.ts, registration.ts, execute.ts, and the
expect(() => …).toThrow(…) assertions across five test files, which would
otherwise have gone quietly green.

Scope

Included

  • The five conversions, the lint rule, and Tier SO.
  • The mechanical yield* at every call site, including tests.

Intentionally unchanged

  • <Retry>, <Result as>, suspension and the error middleware Js api stay
    defined and unbuilt. No semantics change and no vocabulary change.
  • packages/web already builds a fresh Ajv per call via createServerAjv(), so
    it needed nothing.
  • The remaining module-scoped Sets in packages/ (EACH_PROPS,
    RESERVED_STRUCTURAL, the secret-scanner word lists) are constants built from
    their own contents. The rule accepts them by design.

Verification

GateResult
deno task lint0 errors, formatting clean
deno task check0 errors
deno task test349 passed, 0 failed
deno task check:jsrSuccess Dry run complete
pnpm exec tsc --project tsconfig.node.json --noEmitclean
compiled-binary smokepass — main suite, value root, -e '<Badge />', test-agent worker, <WebForm> preflight

Test counts: 344 → 349 passed, 2352 → 2367 steps. The delta is exactly the
new tests — Tier SO's 4 suites (13 steps) and the rule's 1 suite (2 steps).
Nothing else moved.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

architecture.md: "All state is scoped to the operation that owns it, so it
is torn down when the operation is torn down: created inside the run it
describes, provided via context. No module-scoped registries — not as
collections, not hidden inside library objects that accumulate."
Five declarations in packages/core were on the wrong side of that.
The `printErrors(fn)` mark takes the rule's one exception: it is declared
at module evaluation about a function the author owns, so it moves onto
that function under a module-private Symbol rather than into a table.
The segment-cause table and both Ajv instances become run-scoped, provided
via context and reclaimed with the run. The two compile caches beside Ajv
go: Ajv memoizes by schema object within a run, so a per-run instance is
the whole cache — and a shared one answered a schema object mutated
between runs with the first run's validator.
`local/no-module-scoped-registry` reports the shape from now on.
Closes#323.
@github-actions

Copy link
Copy Markdown

PR #325: 💥 Scope engine state to the operation that owns it

28 files, +979 / -200

Scope

🔴 PR has 1179 lines changed. Split into focused PRs.

🟡 1179 lines changed. PRs under 400 receive more thorough review.

🟡 28 files changed. Are all changes related?

🟡 PR mixes config and source changes.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras merged commit 7d7bdf2 into mainAug 4, 2026
10 checks passed
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 10, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 12, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 14, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 22, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 24, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
@taras
taras deleted the feat/operation-scoped-state branch August 27, 2026 01:34
Sign up for freeto 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.

💥 Scope engine state to the operation that owns it

1 participant

@taras
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

💥 Scope engine state to the operation that owns it - #325

Merged
taras merged 1 commit into
mainfrom
feat/operation-scoped-state
Aug 4, 2026
Merged

💥 Scope engine state to the operation that owns it#325
taras merged 1 commit into
mainfrom
feat/operation-scoped-state

Conversation

@taras

@tarastaras commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Closes#323. Carries out architecture.md's State ownership rule (#314).

Why

All state is scoped to the operation that owns it, so it is torn down when the
operation is torn down: created inside the run it describes, provided via
context. No module-scoped registries — not as collections, not hidden inside
library objects that accumulate. One exception: metadata an author declares at
module evaluation, about a value the author owns, may live on that value.

Five declarations in packages/core were on the wrong side of it. Each was one
table per process, shared by every run, that nothing in a caller's scope could
see, override, or clear.

What changes

SiteBeforeAfter
component-failures.tsprinting WeakSeta module-private Symbol on the function
errors.tssegmentCauses WeakMapSegmentCauses, opened per run
validate.tsmodule Ajv + two compile cachesPropsCompiler, opened per run; caches gone
components/parse-schema.tsmodule AjvParseCompiler, opened per run

The printErrors(fn) mark takes the exception, not context. It runs while a
component module is evaluated — outside any operation, with no run to own a
table and no scope to reach — and records what an author declared about a
function the author owns. So it lives on that function: a module-private
Symbol() (not Symbol.for, which anyone could forge), defined non-enumerable
so a wrapper built by copying own properties does not inherit a decision its
author never made, read with Object.hasOwn. This is the exception's one open
application.

The rest become run-scoped.useSegmentCauses(), usePropsCompiler() and
useParseCompiler() are installed where the execution begins and reclaimed with
it. DocumentationError's constructor cannot reach a scope, so reading the
cause moved to a documentationError() builder that runs before it — the cause
is still attached before any observer can see the failure. Expansion driven
directly (a test, a tool describing a document) has no execution around it, so
the outermost expandSegments opens the table for exactly its own lifetime, and
compiling outside a run gets an instance that lives as long as the call.

The two compile caches go rather than move. Ajv memoizes by schema object
within a run already, so a per-run instance is the whole cache. A second table
beside it would only reintroduce the question of which root contract a
remembered validator was compiled under.

Why the Ajv instances count as state

In ajv@8.20.0, _cache is a plain Map and _addSchema does

letsch=this._cache.get(schema);if(sch!==undefined)returnsch;this._cache.set(sch.schema,sch);if(addSchema&&!baseId.startsWith("#")){}

The set is unconditional and precedes the addUsedSchema guard the engine
already sets to false. A module-scoped instance therefore holds a strong
reference to every schema object any run ever compiled, for the life of the
process — and because the key is object identity, it answers a schema object
mutated between runs with the first run's validator. That is not a leak in the
abstract: SO13 demonstrates it through public api alone (a host registers a
component, tightens its props schema, runs again — and the second run accepts
props the schema no longer allows).

The parse path is different and the PR says so: it normalizes its declaration
through parseJson, handing Ajv a fresh object every call, so it never hits the
identity cache. Its harm is unbounded growth rather than a wrong answer, which
is why SO9 asserts the lifetime rather than a stale validator.

The lint rule

local/no-module-scoped-registry (ported from #312's 0673f7d, its
documentation reconciled with the exception this PR applies) reports a Map,
Set, WeakMap or WeakSet built at module scope — declared, exported,
assigned later, held inside another module-scoped value, or a static class
field — with the remedy "create it inside the operation that owns it and provide
it via context." It accepts a table built from its own contents (a constant), an
instance field, and a table handed straight to a call.

Before the conversions it reported 4 of the 5 sites
(component-failures.ts:27, errors.ts:63, validate.ts:85, validate.ts:86).
After them it reports none, and deno task lint is 0 errors.

It does not catch a module-scoped new Ajv(…) — it matches collection
constructors, and the accumulation there is inside a library object rather than
a table this repository wrote. The architecture rule covers it anyway ("not
hidden inside library objects that accumulate"); the rule's own header now says
so, and a reviewer holds that half.

How to verify it

packages/core/tests/state-ownership.test.ts — Tier SO, 13 tests.

SO13 is red on origin/main (verified at f413545, in a throwaway worktree,
using only registerComponents + execute): main renders widget:two where
the schema now requires b. Every other Tier SO test names api this PR
introduces, so "red on main" would only mean the module does not import — no
evidence at all. They are discriminated by mutation instead. All seven were run,
and each reddens exactly the tests that claim its behavior:

MutationReddens
the declaration key is Symbol.forSO4
the declaration is enumerableSO2
the cause table is one per processSO5, SO6
the props compiler is one per processSO8, SO11, SO13
useParseCompiler hands out one shared instanceSO9
a compile cache beside Ajv comes backSO8, SO11, SO13
a fresh compiler per call, even inside a runSO10

Two earlier attempts at these tests reddened under no mutation and were
rewritten rather than kept: SO2 asserted Object.keys, which never lists a
symbol key whatever its enumerability, and SO9 asserted a stale validator on the
path that clones its declaration. SO1, SO3, SO7 and SO12 are ordinary
behavior pins with no mutation of their own.

scripts/tests/no-module-scoped-registry.test.ts covers the rule against both
fixtures.

Breaking

Six published functions become operations. A caller writes yield* where it
previously called; nothing else about any of them changes.

  • compilePropsSchema, compileReturnsSchema, validateProps,
    validateReturnValue — they reach the run's compiler.
  • parseMarkdownDefinition — it compiles the schemas it parses.
  • prepareElicitation, elicit — they compile the question's schema.

compileParseSchema is internal and changes the same way. The use* installers
are deliberately not exported: execute() installs them, direct expansion
opens what it needs, and a call outside a run gets its own instance — so no host
has to learn about them.

A generator conversion has a silent failure mode worth knowing about in
review: a discarded call (compilePropsSchema(props); as a statement) type-checks
and then validates nothing, because nothing iterates it. Every such site was
converted — definition.ts, registration.ts, execute.ts, and the
expect(() => …).toThrow(…) assertions across five test files, which would
otherwise have gone quietly green.

Scope

Included

  • The five conversions, the lint rule, and Tier SO.
  • The mechanical yield* at every call site, including tests.

Intentionally unchanged

  • <Retry>, <Result as>, suspension and the error middleware Js api stay
    defined and unbuilt. No semantics change and no vocabulary change.
  • packages/web already builds a fresh Ajv per call via createServerAjv(), so
    it needed nothing.
  • The remaining module-scoped Sets in packages/ (EACH_PROPS,
    RESERVED_STRUCTURAL, the secret-scanner word lists) are constants built from
    their own contents. The rule accepts them by design.

Verification

GateResult
deno task lint0 errors, formatting clean
deno task check0 errors
deno task test349 passed, 0 failed
deno task check:jsrSuccess Dry run complete
pnpm exec tsc --project tsconfig.node.json --noEmitclean
compiled-binary smokepass — main suite, value root, -e '<Badge />', test-agent worker, <WebForm> preflight

Test counts: 344 → 349 passed, 2352 → 2367 steps. The delta is exactly the
new tests — Tier SO's 4 suites (13 steps) and the rule's 1 suite (2 steps).
Nothing else moved.

Scope confirmation

  • Every changed file supports the purpose described above.
  • Unrelated cleanup and formatting changes are excluded.
  • Generated or mechanical changes are clearly identified.
  • The description matches the final diff and test results.

architecture.md: "All state is scoped to the operation that owns it, so it
is torn down when the operation is torn down: created inside the run it
describes, provided via context. No module-scoped registries — not as
collections, not hidden inside library objects that accumulate."
Five declarations in packages/core were on the wrong side of that.
The `printErrors(fn)` mark takes the rule's one exception: it is declared
at module evaluation about a function the author owns, so it moves onto
that function under a module-private Symbol rather than into a table.
The segment-cause table and both Ajv instances become run-scoped, provided
via context and reclaimed with the run. The two compile caches beside Ajv
go: Ajv memoizes by schema object within a run, so a per-run instance is
the whole cache — and a shared one answered a schema object mutated
between runs with the first run's validator.
`local/no-module-scoped-registry` reports the shape from now on.
Closes#323.
@github-actions

Copy link
Copy Markdown

PR #325: 💥 Scope engine state to the operation that owns it

28 files, +979 / -200

Scope

🔴 PR has 1179 lines changed. Split into focused PRs.

🟡 1179 lines changed. PRs under 400 receive more thorough review.

🟡 28 files changed. Are all changes related?

🟡 PR mixes config and source changes.

Structural

✅ No structural bloat detected.

Slop

✅ Slop indicators look low.

Static Analysis

✅ Oxlint found no issues.

Correctness

No extraneous code patterns detected.

@taras
taras merged commit 7d7bdf2 into mainAug 4, 2026
10 checks passed
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 4, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 10, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 12, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 13, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 14, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 18, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 20, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 22, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 24, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 25, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
taras added a commit that referenced this pull request Aug 26, 2026
The adversarial implementation workflow target was written against a main
that predates the error-model rules (#315), the error vocabulary rename
(#317), error-model semantics (#319), and operation-scoped state (#325).
It asserted `<CollectFailures>` as structural syntax, "the unresolved
diagnostic", and a durable layer that "replays recorded results" — none
of which describe main. This re-derives it on 7d7bdf2.
The error model reaches the documents. A stage component is split by its
`<Output>` boundary: the region inside runs under the `output` error mode,
everything outside is documentation and runs under `throw`, which no
`<PrintErrors>` region replaces. So a stage returns a complete validated
result or it fails, keeping only what it had already rendered — the final
`<Parse>` in each repair loop is a real gate. `throwOnError` is
load-bearing for the same reason: without it a failed prompt records its
failure and returns its text, raising nothing to decide.
The markup did not run. Every stage passed props through expression props
as `agent={props.planner}`, which fails on main with `props is not
defined` — an expression prop reads the bare binding while text
interpolation reads the namespace. Unifying them is #305, whose
acceptance includes expression props reading `props.name`. 22 sites are
corrected to the spelling main supports, and the asymmetry is recorded
with the issue that removes it.
Vocabulary is collapsed onto the concepts #289, #291, and #298 authorize:
artifact ledger, artifact version, run identity, pinned source revision,
stop reason, terminal record, stage boundary, declared inputs, and
cross-process continuation, in place of the four names these files used
for a ledger and the three for a run. Missing capabilities now cite the
issue that supplies them rather than saying only "not implemented", and
replay is described as reaching the state execution resumes from, never
as the continuation itself.
Planning-loop exhaustion stays open. It is recorded against #290, which
pins the behavior; this change reports `verdict.passed` and does not call
an exhausted loop converged.
Evidence: `inspectDocument` parses all 9 frontmatters and compiles both
schema kinds; `compileParseSchema` compiles all 5 embedded draft-07
schemas; `inspectComponent` resolves 21 shipped and 5 repository names
and confirms 9 missing ones unresolved; `InstructionFiles` runs end to
end against the repository's own AGENTS.md.
@taras
taras deleted the feat/operation-scoped-state branch August 27, 2026 01:34
Sign up for freeto 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.

💥 Scope engine state to the operation that owns it

1 participant

@taras