tracegrove 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -554
- package/docs/agent-guide.md +21 -0
- package/docs/browser-driver.md +11 -13
- package/docs/getting-started.md +13 -0
- package/docs/native-jobs.md +1 -1
- package/docs/result-sink.md +2 -2
- package/package.json +66 -13
- package/conformance/coordination-vectors.json +0 -377
- package/docs/architecture.md +0 -126
- package/docs/awr-delivery.md +0 -102
- package/docs/cleanup-followups.md +0 -74
- package/docs/developer-ux.md +0 -315
- package/docs/examples/portable-environments/alongside_runner.json +0 -199
- package/docs/examples/portable-environments/external_staging.json +0 -183
- package/docs/git-source-resolution.md +0 -133
- package/docs/images/ui-run.png +0 -0
- package/docs/local-review-store.md +0 -13
- package/docs/local-scenario-store.md +0 -91
- package/docs/portable-environments.md +0 -155
- package/docs/qualification-registration.md +0 -58
- package/docs/qualification-results.md +0 -59
- package/docs/replay-assessment.md +0 -17
- package/docs/scenario-activation.md +0 -54
- package/docs/scenario-structure.md +0 -58
- package/docs/source-promotion.md +0 -104
- package/docs/source-review.md +0 -21
- package/docs/work-report-attachment.md +0 -127
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
# Portable environment setup — experimental foundation
|
|
2
|
-
|
|
3
|
-
Use the README's single first-run quickstart before adapting your app. This document defines a
|
|
4
|
-
profile/admission boundary; it does not install another runner. The executable scenario remains
|
|
5
|
-
the existing case/flow with its assertions, fixtures and personas. A separate execution profile
|
|
6
|
-
selects where and under what authority that same scenario runs. A host brand or a placement enum
|
|
7
|
-
is not a supported capability.
|
|
8
|
-
|
|
9
|
-
## Current versus needed configuration
|
|
10
|
-
|
|
11
|
-
| Concern | Current executable CLI | New reusable contract / remaining integration |
|
|
12
|
-
| --- | --- | --- |
|
|
13
|
-
| Scenario versus placement | Short authoring config combines app setup and personas; low-level corpus separates cases, profiles, EnvironmentPlan and HostPlan | Reference-only PortableEnvironmentProfile plus per-attempt intent; profile never embeds scenario steps. Selection/compiler/CLI integration remains gated. |
|
|
14
|
-
| Workspace / source / build | Native launch hashes selected source files and observes the interpreter; Git resolver freezes exact base/head | Host-resolved workspace, immutable source-selection/build/config refs. Verify actual installed dependency/build closure; a launch-file hash is not a complete installed closure. |
|
|
15
|
-
| Start app alongside runner | Node, FastAPI and Django native process hosts, fresh directory/port, GET readiness; command wrapper blocked | Reuse frozen host/launch/dependency plan refs. Discover process/runtime/loopback/filesystem capabilities. No arbitrary shell execution DSL. |
|
|
16
|
-
| Existing hosted staging | Declared origins and environment classes exist; general authenticated external-host execution is not wired | Resolve exact deployment and endpoint, confirm authorized access and identity, then read readiness. Never restart or tear down a borrowed deployment. Not qualified here. |
|
|
17
|
-
| Endpoints | Native host reports/reserves loopback port; browser and HTTP use that observed origin | Host endpoint resolver refs distinguish owned launch, service discovery and external deployment. No embedded credential-bearing URLs, tunnels or assumed inbound access. |
|
|
18
|
-
| Browser / dependencies | Chromium driver; explicit Playwright binary/system libraries. Python environments separate. Docker sample harness exists | Required versioned capabilities and pinned dependency plans; unsupported/missing features block. No automatic Docker, services, root, persistent-volume or browser-library assumption. |
|
|
19
|
-
| Network | Browser/API effect envelopes constrain adapter actions; arbitrary launched app egress is not proven confined | Host-enforced policy ref, explicit allowed endpoints, inbound none/loopback. Current native host cannot attest full network containment; a strict profile must remain blocked there. No policy changes or gateway bypass. |
|
|
20
|
-
| Application persona | Sample host issues attempt-local synthetic bearer tokens; adapters consume in-memory credentials | personaRef + secretRef, resolved by that environment's authorized broker. No values in scenarios/profiles/artifacts. Declaring the ref grants no access. |
|
|
21
|
-
| Execution authority | Current local process runs with the environment's existing OS/sandbox permissions | Independent execution actor, policy ref and optional execution secret refs. App personas cannot grant workspace/service/admin authority. Host must validate scope/lease/operation permission. |
|
|
22
|
-
| Synthetic data / reset | API fixture create/readback/reverse cleanup; isolated sample data dirs | Versioned seed/generator/namespace/reset/resource policy refs. Reset only host-resolved owned isolated resources; no production reset, global prune or database integrity replay. General DB/service provisioning is not installed. |
|
|
23
|
-
| Artifacts / redaction | Local verified bundles, JSON/Markdown/JUnit, WebM and media integrity. Raw bodies/video can be private | Destination/durability/retention/redaction policy/size bound. Ephemeral hosts must prove authorized export before completion; executable redaction and general destination adapters remain unfinished. |
|
|
24
|
-
| Resource/time/spend | Existing request/action deadlines and budgets; native/Docker enforcement differs; draft provider caps differ | Explicit wall/cleanup reserve, CPU/memory/disk/request/browser/provider/agent/spend limits. Host must prove enforceability, including zero calls/spend. A number in YAML is not enforced accounting. |
|
|
25
|
-
| Ownership / cleanup | Scoped process/data/fixture inventory, acknowledged stop, unresolved cleanup retained | Lease/cleanup policy refs and per-attempt bindings; acquired resources only. Durable acquisition CAS/fencing, atomic artifacts, expired-lease recovery and real-provider crash/interleaving remain integration gates. |
|
|
26
|
-
| Replay | Verify/play existing evidence; `test` creates fresh actions; low-level rerun preserves lineage | Explicit fresh execution, evidence playback, fresh-fixture, recorded-I/O or history mode; host-supported replay plan required. Source fixture reuse is rejected by the existing lifecycle validator. No replay engine installed. |
|
|
27
|
-
| Agent output / onboarding | check/doctor/test JSON and exit codes; doctor discovers authoring projects and reports native compiled-plan provenance, dependencies and structured errors. Other top-level errors sometimes prose | SDK preflight returns typed checks, omissions, stable errors and recovery; ready is execution not started and verification not evaluated. It is not an admission token. Portable profile dispatch remains gated. |
|
|
28
|
-
|
|
29
|
-
## Reference-only profiles
|
|
30
|
-
|
|
31
|
-
Generated, schema-validated examples:
|
|
32
|
-
|
|
33
|
-
- [App alongside runner](examples/portable-environments/alongside_runner.json)
|
|
34
|
-
- [Existing staging](examples/portable-environments/external_staging.json)
|
|
35
|
-
|
|
36
|
-
Every `example.*` ref is an unresolved placeholder, including its illustrative digest. Neither
|
|
37
|
-
file registers a host, authorizes a target or can be passed to the current CLI config loader.
|
|
38
|
-
The source is `src/authoring/environmentTemplates.ts`; `node --import tsx
|
|
39
|
-
scripts/export-environment-examples.ts` regenerates them. Tests compare generated bytes/records
|
|
40
|
-
and parse them through the same Zod schemas exported to JSON Schema. Do not maintain another
|
|
41
|
-
handwritten environment DSL or copy credentials into these files.
|
|
42
|
-
|
|
43
|
-
Recommended setup is one shared scenario tree plus one small profile selection per environment:
|
|
44
|
-
`mac-local`, `coding-cloud-local`, `workflow-cloud`, and separately `authorized-staging`. Each
|
|
45
|
-
selection resolves the same logical source/build/configuration refs to that host's workspace and
|
|
46
|
-
resolves credential refs in that host. These names are recommendations, not installed adapters.
|
|
47
|
-
Start with the native no-service API sample, then Chromium, then OrgX with its isolated dependency
|
|
48
|
-
and fixture prerequisites; qualify each stage before enabling it in onboarding.
|
|
49
|
-
|
|
50
|
-
For application credentials, have the environment's existing broker bind a logical secret ref
|
|
51
|
-
to the intended test persona under an attempt-scoped lease. For execution permissions, separately
|
|
52
|
-
bind the execution actor to an existing policy and any required execution credential refs. The
|
|
53
|
-
preflight interface checks access metadata without fetching or returning secret values. Actual
|
|
54
|
-
dispatch must obtain an in-memory handle from that broker and erase/revoke it at teardown. No
|
|
55
|
-
universal environment-variable/token export, copied browser session, persistent credential setup
|
|
56
|
-
or transfer between Mac/Codex/Claude/OrgX environments is implemented or authorized.
|
|
57
|
-
|
|
58
|
-
The optional non-secret configuration ref is also host-resolved: its resolver must reject secret
|
|
59
|
-
values and must not evaluate arbitrary project code during preflight. Existing `app.env` is
|
|
60
|
-
serialized into frozen inputs; use it only for non-secret test configuration. Hashes/ref names are
|
|
61
|
-
not an automatic secret detector or evidence-content redactor.
|
|
62
|
-
|
|
63
|
-
## Read-only SDK preflight
|
|
64
|
-
|
|
65
|
-
`preflightPortableEnvironment(intent, ports, {signal, timeoutMs})` resolves a self-digested frozen
|
|
66
|
-
profile, validates scope and requested replay mode, and invokes bounded trusted read-only probes.
|
|
67
|
-
Each observation binds the exact profile, execution/attempt/generation, actor and request digest,
|
|
68
|
-
has an observed/expiry time and references host evidence. Unknown/stale/unsupported required
|
|
69
|
-
capabilities block. Optional omissions remain visible. Authorization is checked before target or
|
|
70
|
-
secret metadata. Errors returned by a port are never serialized into the report.
|
|
71
|
-
|
|
72
|
-
The host probes inspect launch/readiness capability and existing target metadata. Preflight never
|
|
73
|
-
starts a server, changes permissions, installs dependencies, issues credentials, creates fixtures,
|
|
74
|
-
resets data, creates tunnels or performs cleanup. Actual post-launch readiness, identity, actions,
|
|
75
|
-
artifact byte verification and cleanup need their own execution receipts. Ready preflight reports
|
|
76
|
-
must be re-admitted under a live lease before effects; they are not reusable permission tokens.
|
|
77
|
-
|
|
78
|
-
Examples of actionable machine output:
|
|
79
|
-
|
|
80
|
-
| Code | Meaning / recovery |
|
|
81
|
-
| --- | --- |
|
|
82
|
-
| `capability_missing` | Install through an already authorized dependency path or choose a provisioned host; do not assume Docker/root. |
|
|
83
|
-
| `persona_credential_missing` | Bind the existing logical secret reference in this host's broker. Never paste the value into a scenario. |
|
|
84
|
-
| `authorization_denied` | Stop before target/secret probing; obtain owner review or select an already authorized target. Do not change permissions automatically. |
|
|
85
|
-
| `network_unknown` | No observed enforcement for this policy; select a host/policy with proof, preserving current restrictions. |
|
|
86
|
-
| `artifacts_missing` | Select an authorized exportable destination before an ephemeral host run. |
|
|
87
|
-
| `probe_binding_mismatch` | Reject stale/cross-run, wrong actor or wrong request evidence; collect a fresh scoped observation. |
|
|
88
|
-
| `preflight_deadline` / `preflight_cancelled` | Stop bounded probes; preserve the blocked report. No execution started. |
|
|
89
|
-
|
|
90
|
-
The report uses `status: ready|blocked`, `exitCode: 0|2`, `checks[]` with request/state/required/
|
|
91
|
-
evidenceRefs/code/recovery, `errors[]`, `execution: not_started` and
|
|
92
|
-
`verificationVerdict: not_evaluated`. CLI `doctor --dir <project> --json` discovers an authoring
|
|
93
|
-
config and reuses the existing compiler and planner; low-level `--config`/`--profile` remain
|
|
94
|
-
supported. Its separate `tracegrove.doctor/v1` report includes selected host/corpus refs,
|
|
95
|
-
source/runtime digests, dependency checks and recovery actions. Compilation writes derived
|
|
96
|
-
files and interpreter version probes may run; the app never starts. Required Chromium executable
|
|
97
|
-
presence is installation metadata, not a tested engine or environment qualification. No portable
|
|
98
|
-
profile execution flag is advertised.
|
|
99
|
-
|
|
100
|
-
## Environment acceptance and rollout
|
|
101
|
-
|
|
102
|
-
1. **This slice:** frozen reference-only schemas/templates, bounded SDK probes, negative
|
|
103
|
-
conformance and README first-use checks. Synthetic probe tests establish contract behavior,
|
|
104
|
-
not host support. Independent review must challenge secret/actor separation, stale observations,
|
|
105
|
-
ignored cancellation, scope, startup-versus-staging and security/spend enforcement claims.
|
|
106
|
-
2. **Native selection/onboarding:** doctor now resolves the existing native authoring/HostPlan
|
|
107
|
-
selection and reports source/runtime/dependency inspection. General portable profile dispatch
|
|
108
|
-
and host-specific missing-ref recovery remain gated; no silent policy downgrade. Repeat the clean API/browser
|
|
109
|
-
first run independently on each actual machine. Mac remains unqualified while offline.
|
|
110
|
-
3. **External staging:** install a reviewed read-only external-host adapter and existing secret
|
|
111
|
-
broker integration. Prove deployment/endpoint identity and authorized test-persona access;
|
|
112
|
-
fixtures require separately scoped owned synthetic-resource authority. No denied staging retry
|
|
113
|
-
is part of this work. Do not infer support from local notes or Inspector/mock tests.
|
|
114
|
-
4. **OrgX-triggered/workflow cloud:** bind an actual authorized runner/workspace/lease, discover
|
|
115
|
-
capabilities and enforce budgets/export/cleanup. Reuse existing dispatch ownership; a task
|
|
116
|
-
record is not a running verifier. Add real interruption/interleaving recovery before broader
|
|
117
|
-
resource/provider integration; keep journals/atomic-publication gates open until tested.
|
|
118
|
-
|
|
119
|
-
For every claimed environment retain: clean dependency/runtime install, exact tool/source/build
|
|
120
|
-
and profile pins; setup elapsed time and manual steps (including failures); fresh capability and
|
|
121
|
-
authorization observations; the actual API/browser/client journey with positive/negative
|
|
122
|
-
assertions; verified artifacts exported before ephemeral storage expires; owned-resource cleanup
|
|
123
|
-
readback; and measured cost or explicitly unmeasured infrastructure cost. Preserve failed attempts
|
|
124
|
-
and distinguish preflight, execution, verification and business acceptance. No environment becomes
|
|
125
|
-
supported from templates, schemas, host brand, CI color or prose alone.
|
|
126
|
-
|
|
127
|
-
Current evidence is limited to this Codex Linux cloud's isolated native/API/browser fixtures and
|
|
128
|
-
the hosted Linux sample CI lanes already linked in the release audit. Actual OrgX #3620 proved a
|
|
129
|
-
settings heading, #3614 a method boundary, and #3645 failed receipt lookup with unavailable offline
|
|
130
|
-
workspace/store. None proves full OrgX workflow/client acceptance. Local Docker registry HTTPS
|
|
131
|
-
was refused; hosted CI's Docker success is separate evidence. Claude coding cloud, Hope's Mac,
|
|
132
|
-
OrgX-triggered runtime and authenticated external staging remain unqualified.
|
|
133
|
-
|
|
134
|
-
## Recorded clean-room onboarding
|
|
135
|
-
|
|
136
|
-
An independent AI reviewer followed only the README at source
|
|
137
|
-
`3894ed6e43b32c0177be03397e22df757405ed6c` in a fresh Linux x86_64 checkout, with a new toolchain,
|
|
138
|
-
dependency tree, cache and sample. Default Node 24.19.0/npm 11.9.0 required the documented optional
|
|
139
|
-
bootstrap to Node 22.23.3/npm 10.9.9. The reviewer preserved PATH/cache across stateless shell
|
|
140
|
-
calls; the README now explicitly recommends one shell session. No source/flow repair or
|
|
141
|
-
undocumented install was needed. Observed setup through bundle verification took 39 seconds,
|
|
142
|
-
including README inspection and orchestration; it is not a benchmark or measured infrastructure cost.
|
|
143
|
-
|
|
144
|
-
Doctor/check, both real notes scenarios, independent API readbacks, stranger 403/empty-list,
|
|
145
|
-
anonymous 401 and deletion 404 assertions passed. Original and copied evidence bundles verified
|
|
146
|
-
with two receipts and no problems. Fixture/process/workspace cleanup was confirmed, with independent
|
|
147
|
-
readback finding both owned process entries and workspaces absent. The private receipt and run are
|
|
148
|
-
retained privately in the saved cloud environment; they are not shipped in npm. One stale “any command” table claim was corrected after review.
|
|
149
|
-
The canonical executed quickstart is unchanged by that documentation correction.
|
|
150
|
-
|
|
151
|
-
The automated README journey separately passed using the existing build/dependencies. Its first
|
|
152
|
-
harness run misread the receipt's `critical` IDs as errors; the corrected harness requires all
|
|
153
|
-
attempted and critical IDs to be confirmed. That initial harness failure receipt is preserved.
|
|
154
|
-
Neither run exercises portable-profile dispatch, a browser, another cloud, Mac, authenticated
|
|
155
|
-
staging or an npm registry installation. Those environment acceptance gates remain open.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Qualification registration and invalidation
|
|
2
|
-
|
|
3
|
-
`registerQualificationRound` creates a sealed pending admission before execution. It requires an exact scenario revision token, a structurally validated definition, its complete frozen selection matrix and fresh leased-state refs. A new campaign and per-cell execution/attempt identities are allocated together with the next monotonic round sequence.
|
|
4
|
-
|
|
5
|
-
The prototype uses `SelectionManifest` as the qualification matrix. Its policy, required case/persona/target strata and exclusions are frozen; the round selection must match them exactly. Every scenario case must retain a required matrix cell. Changed personas/targets, empty or duplicated cells, unexplained exclusions and dropped required cases are refused. The exported `qualificationStrataDigest` uses stable code-unit ordering across hosts.
|
|
6
|
-
|
|
7
|
-
`ScenarioPorts` are trusted host ports, never candidate/plugin inputs. `validateDefinition` must resolve and validate the exact review, replay-contract, matrix, policy and target-profile closure. `compareAndSwap` must atomically verify/reserve the submitted state leases, enforce ownership/fencing/freshness, append the admission and update the projection, or publish none of them. This API does not provision physical state or grant per-cell effects. It does not install that storage adapter.
|
|
8
|
-
|
|
9
|
-
Snapshots include all registered admissions, including rounds still pending or later failed; the admission itself carries no outcome claim. The projection's latest sequence must match complete, scoped, sealed history. Reused campaign/execution/attempt/lease identities and incomplete histories are conflicts. A lease cannot become fresh by changing its revision or digest. An exhausted 500-round prototype history blocks until an authoritative archival index is supplied; it never silently drops earlier registrations.
|
|
10
|
-
|
|
11
|
-
Registration increments aggregate version and latest-round sequence without activating coverage. Any older activation snapshot must therefore conflict even before the newest round completes. Concurrent registration/invalidation uses the same aggregate-version CAS. Losing writers publish no admission and do not advance the epoch.
|
|
12
|
-
|
|
13
|
-
`invalidateScenario` requires a new immutable definition revision of the same scenario, advances the invalidation epoch, clears activation authority and moves coverage to `degraded`. It retains historical round records. Retired coverage cannot be resurrected through this operation. An observed product regression does not itself call semantic invalidation or remove its detecting case.
|
|
14
|
-
|
|
15
|
-
Terminal campaign binding is available through [qualification result reduction](qualification-results.md), followed by [read-only replay assessment](replay-assessment.md) and [explicit activation](scenario-activation.md). [LocalScenarioStore](local-scenario-store.md) supplies durable local registration/invalidation and scoped lease-identity claims on the existing ledger, with required host authority callbacks. Promotion, structural-validation transitions and hosted persistence remain open. A registration record is neither a passing round nor release coverage.
|
|
16
|
-
|
|
17
|
-
## Executing a registered round
|
|
18
|
-
|
|
19
|
-
The SDK can prepare a new qualification request from an unchanged frozen trial or
|
|
20
|
-
work-proof plan. This creates new sealed request, fidelity and fixture documents;
|
|
21
|
-
it does not read, rewrite or promote trial receipts.
|
|
22
|
-
|
|
23
|
-
```ts
|
|
24
|
-
const owner = localQualificationExecutionOwner(store, authorizeEffects);
|
|
25
|
-
const qualified = await prepareQualificationExecution(
|
|
26
|
-
frozenPlan, admission.ref, scope, ledger, owner,
|
|
27
|
-
);
|
|
28
|
-
const run = await executeBundle({
|
|
29
|
-
bundle: qualified, scope, ledger, stateDir, qualification: owner,
|
|
30
|
-
});
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
The store must use this exact ledger and state directory. `authorizeEffects` is a
|
|
34
|
-
trusted host capability checked before host start, fixture creation and each
|
|
35
|
-
forward step. It must establish actual permission to affect the selected target;
|
|
36
|
-
read and registration permission alone do not suffice. The store rechecks current
|
|
37
|
-
definition, invalidation epoch, reviewed closure and physical leases around each
|
|
38
|
-
authorization await. Cleanup remains available after forward permission is revoked.
|
|
39
|
-
External authority synchronization and provider fencing remain host responsibilities.
|
|
40
|
-
|
|
41
|
-
Every cell uses its registered execution and attempt IDs. A single durable claim
|
|
42
|
-
binds the admission to the complete frozen request, independently of caller retry
|
|
43
|
-
keys. Terminal redelivery returns the recorded summary without repeating effects.
|
|
44
|
-
An incomplete claim, including a lost publication acknowledgement, requires
|
|
45
|
-
reconciliation; it never automatically replays preallocated effects. Execution
|
|
46
|
-
directories cannot overwrite existing evidence. The trusted controller must keep
|
|
47
|
-
its ledger and evidence directory inaccessible to candidate processes.
|
|
48
|
-
|
|
49
|
-
Pass resulting bundles to `reduceQualificationRound` with the persisted admission
|
|
50
|
-
resolver and independent issuer authentication. Structural bundle verification
|
|
51
|
-
alone does not establish an authentic qualification result. Local tests use real
|
|
52
|
-
native HTTP effects and durable registration, with explicitly simulated host
|
|
53
|
-
authorization, reviewed-source and physical-lease callbacks.
|
|
54
|
-
|
|
55
|
-
There is no automatic CLI qualification owner. Qualification without an explicit
|
|
56
|
-
runtime owner, a trial disguised with lifecycle refs, and activated regression
|
|
57
|
-
requests remain refused. This SDK path does not activate coverage or prove hosted
|
|
58
|
-
source, issuer, lease provisioning or release authority.
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Complete terminal qualification rounds
|
|
2
|
-
|
|
3
|
-
`reduceQualificationRound(ports, { admissionRef, scope, bundleDir })` reads a single verified bundle snapshot and binds its entire campaign to an authentic previously registered admission. It returns a sealed `workflow.qualification-round/v1` document containing the exact admission, campaign and terminal receipt references. Redelivery of identical evidence produces the same result reference and digest.
|
|
4
|
-
|
|
5
|
-
Every selected cell needs exactly one terminal receipt with its preallocated execution and attempt identity. Missing cells, duplicate allocations, substituted scope/campaign/selection/policy/strata, mismatched scenario references and invalid raw evidence are rejected. The bundle reader reapplies the full saved cell and campaign guards, including assertions, identity observations, capture, cleanup and receipt bindings. No caller-supplied success count replaces those checks.
|
|
6
|
-
|
|
7
|
-
The host owns `authorize`, `resolveAdmission` and `authenticateEvidence`. The admission resolver must read authentic persisted registration and reserved state, not accept an imported producer document as registration. Evidence authentication must validate the exact definition/replay/policy/matrix/target closure and issuer/effect authority against the captured bundle manifest digest. A host without those implementations must refuse the operation. Callbacks receive separate copies so mutation cannot rewrite the result being sealed. The reducer publishes no persistence write; a host must store the result with its immutable admission binding and enforce idempotency/conflict handling.
|
|
8
|
-
|
|
9
|
-
Complete failed, blocked, cancelled, inconclusive and mock campaigns remain terminal evidence. A result has neither `qualifies` nor a live proof level. It does not activate coverage. [Replay assessment](replay-assessment.md) derives independent-round readiness, latest-round and epoch checks and policy-specific revision proof. [Explicit activation](scenario-activation.md) supplies an atomic host contract and local journal adapter. A historical terminal result can be retained after invalidation without becoming eligible for current activation.
|
|
10
|
-
|
|
11
|
-
[Registered SDK execution](qualification-registration.md#executing-a-registered-round)
|
|
12
|
-
uses actual persisted admissions and allocated cell identities with an explicit runtime
|
|
13
|
-
owner. Qualification without that owner and activated regression execution remain blocked.
|
|
14
|
-
Older consumer fixtures simulate registration around real observations; they do not prove
|
|
15
|
-
authentic hosted qualification.
|
|
16
|
-
|
|
17
|
-
## Durable local terminal results
|
|
18
|
-
|
|
19
|
-
`LocalQualificationResults` connects this reducer to the existing `LocalResultSink` and
|
|
20
|
-
`LocalLedger`. It retains a complete immutable bundle before atomically publishing the
|
|
21
|
-
admission-to-round index. It does not create a second archive, database or readiness flag.
|
|
22
|
-
|
|
23
|
-
```ts
|
|
24
|
-
const results = new LocalQualificationResults(ledger, scope, {
|
|
25
|
-
authorize: authorizeResultRead,
|
|
26
|
-
authorizeRetention: authorizeResultRetention,
|
|
27
|
-
resolveAdmission: (ref, scope) => store.resolveAdmission(ref, scope),
|
|
28
|
-
authenticateEvidence,
|
|
29
|
-
});
|
|
30
|
-
const saved = await results.retain({ admissionRef: admission.ref, scope, bundleDir });
|
|
31
|
-
// Supply this resolver to ReplayAssessmentPorts:
|
|
32
|
-
const resolveRound = (admission) => results.resolveRound(admission);
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
All authority callbacks are required. Read permission, retention permission and issuer
|
|
36
|
-
authentication are distinct. Registration must come from an authoritative owner; the
|
|
37
|
-
result sink's integrity check does not authenticate a producer. Every historical lookup
|
|
38
|
-
rechecks permission, persisted admission, raw bundle integrity, issuer authentication,
|
|
39
|
-
manifest digest and exact terminal round bindings. Pending work returns null only after
|
|
40
|
-
checking authentic registration. Broken or inaccessible retained evidence raises an error.
|
|
41
|
-
|
|
42
|
-
Both outcomes and raw bytes remain available after the producer's directory is deleted.
|
|
43
|
-
Duplicate and concurrent retention of the same admission/manifest converge on one index
|
|
44
|
-
record. Different bytes under an existing round conflict. The sink accepts an expected
|
|
45
|
-
manifest digest, so bytes changed after issuer authentication cannot claim the campaign
|
|
46
|
-
in the generic index. A crash before index publication
|
|
47
|
-
can leave an integrity-checked generic result, which stays pending as a qualification round;
|
|
48
|
-
retry reconciles it. A lost acknowledgement after publication recovers the original round
|
|
49
|
-
after reopening the ledger. Neither recovery path executes the candidate again.
|
|
50
|
-
|
|
51
|
-
The bounded index permits 500 rounds per scope and requires archival indexing at capacity;
|
|
52
|
-
it never drops failures or pending admissions to make coverage pass. The controller must
|
|
53
|
-
protect the state directory from candidate writes. This is local single-writer storage,
|
|
54
|
-
not distributed fencing, hosted IAM, physical lease provisioning or atomic activation.
|
|
55
|
-
Tests include real registration and native HTTP effects, producer deletion, journal reopen,
|
|
56
|
-
lost publication acknowledgements, concurrent retention, permission/issuer revocation and
|
|
57
|
-
byte replacement across authorization awaits. Two independent real registered campaigns
|
|
58
|
-
feed replay assessment through this index. Host, source, physical-lease and issuer authority
|
|
59
|
-
are explicitly simulated; hosted qualification and release coverage remain unproven.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Replay assessment
|
|
2
|
-
|
|
3
|
-
`assessScenarioReplay(ports, token)` derives read-only readiness from the complete registered scenario history and authenticated raw bundle snapshots. It never accepts caller-provided passing assessments and never activates coverage. A host must still perform explicit authenticated activation with an atomic comparison against the returned scenario revision token, chosen rounds and exact definition bindings.
|
|
4
|
-
|
|
5
|
-
The immutable, scoped `workflow.qualification-policy/v1` selects environment or revision proof and requires between two and twenty independent rounds. Two is the minimum; there is no mock-only or single-run activation policy. Source-derived scenarios additionally require revision proof even when the policy requests environment proof.
|
|
6
|
-
|
|
7
|
-
Every current-epoch round retains its exact scenario/replay/policy/matrix/target-profile/strata bindings. Registration history is complete, monotonic and checked before any results are filtered. Reused campaign, execution, attempt or leased-state identities are refused. An incomplete history or unknown issuer is an error, never an empty passing report. Old epochs remain in the host's history but cannot count toward current qualification.
|
|
8
|
-
|
|
9
|
-
Each terminal round is re-derived through the same authenticated snapshot reader used by `reduceQualificationRound`; the trusted result index must match that derived round reference. Required cell coverage, assertions, capture, observed identity and cleanup guards therefore run again. Mock, replayed, intercepted, fault-injected or stubbed claimed boundaries cannot count as live proof. Required target identities must be nonempty and observed; the full observed tuple must match the expected tuple. A failed, cancelled, blocked or inconclusive campaign cannot qualify even when some cells passed.
|
|
10
|
-
|
|
11
|
-
Revision proof additionally binds every resolved repository role, URL, commit, origin, object reference and lockfile digest to the observed target and requires a registered resolver reference. Generic environment proof cannot satisfy a revision-specific policy or waive missing/mismatched source identity when source bindings or expected repository identities exist. Source-bound requests must retain the scenario's reviewed source plan. These comparisons do not authenticate observations by themselves: `authenticateEvidence` must establish issuer authority, real state leases, the reviewed source/replay/policy/matrix/target closure, required capture and independently observed target fields against the captured manifest digest. Copying requested identities into an observation is insufficient. The prototype does not install that host adapter or a source resolver.
|
|
12
|
-
|
|
13
|
-
The latest admitted current-epoch round must be terminal and qualify. Two older passes do not hide a newer pending or nonqualifying campaign. All current-epoch rounds, including nonqualifying ones, appear in the report. Version, definition, epoch and latest sequence are rechecked after reading evidence; a concurrent registration or semantic edit makes the report stale. A subsequent activation must repeat its atomic comparison because an edit can still arrive after this read-only report returns.
|
|
14
|
-
|
|
15
|
-
Reports contain sealed `workflow.replay-assessment/v1` documents and their resolvable `workflow.replay-finding/v1` reason documents. Proof levels are structural, mock, environment or revision. These are observations, not permissions. The report contains its exact revision token and qualifying round refs for a future activation owner; the schema's `qualifies` boolean alone grants no authority.
|
|
16
|
-
|
|
17
|
-
Tests run real local native application observations and genuine mock observations with explicitly simulated catalog registration and issuer ports. They prove consumer reduction and race handling. Synthetic resolved-source fixtures exercise classifier guards only. The [local result index](qualification-results.md#durable-local-terminal-results) supplies retained terminal evidence, and [explicit activation](scenario-activation.md#local-atomic-storage) has a durable journal adapter. [Structural validation](scenario-structure.md) shares the executor preflight and supports proposed/degraded transitions. [Source-plan promotion](source-promotion.md) binds current approved storage to proposed scenarios. Additional integration tests use actual registration and native execution with simulated external authority. Hosted registration/issuer authority, live staging qualification and activated regression execution remain open.
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Explicit scenario activation
|
|
2
|
-
|
|
3
|
-
`activateScenario(ports, intent)` consumes an exact scenario revision token, replay/policy/matrix/target references, an explicit selection of terminal round references and a scoped idempotency key. It returns a sealed `workflow.scenario-activation/v1` receipt. Actor identity and the authorization policy come from the authenticated host's `authorizeActivation(scope, intentDigest)`; callers cannot submit an actor, approval flag or readiness result.
|
|
4
|
-
|
|
5
|
-
The operation requires a validating scenario, checks all expected definition bindings and re-derives replay qualification from authenticated complete evidence. The selected set must satisfy the policy's independent-round minimum and include the latest admitted qualifying round. Duplicate or foreign rounds, mock-only proof, a newer pending round and stale scope/version/epoch are refused. Existing matrix, history, issuer and bundle guards are shared with replay assessment.
|
|
6
|
-
|
|
7
|
-
`compareAndSwapActivation` is an atomic authority boundary. In one transaction, the host must compare validating state, aggregate version, definition and replay/policy/matrix/target digests, epoch, latest admitted sequence, exact immutable selected result refs and current activation authorization. It must enforce the scoped idempotency key and publish the assessment/finding records, activation receipt and active projection together, or publish none. The selected-result check still matters when a result index changes without advancing the scenario version. A registered newer round or semantic invalidation must conflict with an older activation attempt. The local adapter below uses the existing journal; hosted transaction storage remains a separate host integration.
|
|
8
|
-
|
|
9
|
-
Repeated round order is normalized. An already committed identical intent returns its original receipt without another write, including after a lost commit acknowledgement or concurrent identical delivery. Reusing the key for a different intent conflicts. Authorization runs before historical receipt lookup too. Returning an earlier activation receipt does not assert that coverage remains active now: a later semantic invalidation or retirement remains in effect, and retries cannot resurrect it. Read the current projection to establish current state.
|
|
10
|
-
|
|
11
|
-
This API cannot activate proposed, degraded, active or retired projections through a fresh intent. Promotion and successful structural validation must first establish validating state through their own authority. Product regressions remain visible through qualification/release evidence; they do not implicitly call semantic invalidation or remove the detecting case.
|
|
12
|
-
|
|
13
|
-
## Local atomic storage
|
|
14
|
-
|
|
15
|
-
`LocalScenarioStore.activationPorts(results, authority)` connects explicit activation
|
|
16
|
-
to the scenario registry and `LocalQualificationResults` on the same `LocalLedger`.
|
|
17
|
-
It reuses the public decision validator and independently rederives replay assessment
|
|
18
|
-
inside the commit boundary. Submitted readiness flags, actors, reports and projections
|
|
19
|
-
are compared with freshly derived values; they cannot grant authority.
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
const ports = store.activationPorts(results, {
|
|
23
|
-
resolvePolicy,
|
|
24
|
-
authorizeActivation, // Current authenticated owner and policy for this exact intent digest.
|
|
25
|
-
});
|
|
26
|
-
const activation = await activateScenario(ports, intent);
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
The adapter checks the scenario registry version, complete result-index version and
|
|
30
|
-
captured archive manifest digests after its final activation authorization await.
|
|
31
|
-
There is no await between those checks and the single synced append containing the
|
|
32
|
-
active projection, receipt and full assessment/finding records. An unrelated change
|
|
33
|
-
to the scope's registry or result index can conflict conservatively; retry from a
|
|
34
|
-
fresh snapshot. Revocation and physical/provider fencing outside this local writer
|
|
35
|
-
still require the host to synchronize its authority checks with its controller.
|
|
36
|
-
|
|
37
|
-
Idempotency keys are unique across scenarios in the scope. Reopen reads the complete
|
|
38
|
-
activation and projection from the same journal entry. A write failure publishes
|
|
39
|
-
neither; a committed entry with a lost acknowledgement returns its original receipt
|
|
40
|
-
on retry. Historical retrieval requires current activation authorization and never
|
|
41
|
-
reverses a later invalidation. Existing registration-only journals read with empty
|
|
42
|
-
activation history; an active projection without its persisted receipt is refused.
|
|
43
|
-
The scope permits 500 retained activations before explicit archival indexing is needed.
|
|
44
|
-
|
|
45
|
-
Tests use actual registered native/mock execution, the immutable result sink and
|
|
46
|
-
durable scenario journal, alongside the earlier in-memory consumer tests. They cover
|
|
47
|
-
concurrency, lost acknowledgement with reopen, pre-write failure, forged submissions,
|
|
48
|
-
registration/invalidation/revocation/archive/index races and corrupt persisted reports.
|
|
49
|
-
Host, reviewed-source, physical-lease and issuer authority are explicitly simulated.
|
|
50
|
-
These proofs do not establish hosted activation, deployed staging qualification or
|
|
51
|
-
live regression admission. [Structural transitions](scenario-structure.md) have a local
|
|
52
|
-
adapter. [Source-plan promotion](source-promotion.md) has a local approved-review bridge.
|
|
53
|
-
Hosted persistence and
|
|
54
|
-
activated regression execution remain open.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Structural validation before qualification
|
|
2
|
-
|
|
3
|
-
`LocalScenarioStore.propose(definition, selections)` stores an authorized immutable
|
|
4
|
-
scenario in `proposed` state. Qualification registration refuses that state.
|
|
5
|
-
`validateScenarioStructure(ports, token, frozenPlan)` performs static checks and
|
|
6
|
-
records the transition to `validating`. It can also revalidate a `degraded` revision
|
|
7
|
-
after semantic invalidation. It does not run the candidate or claim functional PASS.
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
await store.propose(definition, [qualificationMatrix, selectedRound]);
|
|
11
|
-
const validation = await validateScenarioStructure(
|
|
12
|
-
store.structuralPorts({ authorizeValidation }),
|
|
13
|
-
exactScenarioRevisionToken,
|
|
14
|
-
frozenTrialPlan,
|
|
15
|
-
);
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
The plan must be a sealed trial/work-proof request without lifecycle refs or plan
|
|
19
|
-
blockers. Its cases, personas, target cells and exclusions must exactly match the
|
|
20
|
-
scenario matrix. The implementation shares the executor's actual document resolution,
|
|
21
|
-
capability reproduction, fixture/fidelity checks and case compiler. Missing fixture
|
|
22
|
-
plans, changed fidelity, unsupported capabilities and unresolved/modified documents
|
|
23
|
-
fail before a host, fixture operation or provider starts. Matrix policy is taken from
|
|
24
|
-
the scenario's reviewed definition; this operation cannot change that matrix.
|
|
25
|
-
|
|
26
|
-
The authenticated host supplies `authorizeValidation(scope, intentDigest)`, returning
|
|
27
|
-
the current actor and authorization policy for the exact token, frozen request and
|
|
28
|
-
executable-closure digest. Source/review/definition checking remains the store's
|
|
29
|
-
required `validateDefinition` responsibility. No permission or independent source
|
|
30
|
-
validation is inferred from a caller's success flag. Proposed storage is not itself
|
|
31
|
-
the source-plan promotion manifest; [source promotion](source-promotion.md) supplies
|
|
32
|
-
that separate approved-review operation.
|
|
33
|
-
|
|
34
|
-
The local adapter recompiles the supplied closure and rechecks definition and actor
|
|
35
|
-
authority before publishing the sealed `workflow.scenario-structure/v1` receipt and
|
|
36
|
-
validating projection in one synced registry entry. A competing edit, invalidation or
|
|
37
|
-
authorization change publishes no validation. The receipt records the exact scenario
|
|
38
|
-
token, request, qualification matrix, executable closure, actor, policy and timestamp.
|
|
39
|
-
It clears current qualification/activation refs without deleting historical evidence.
|
|
40
|
-
|
|
41
|
-
Repeated identical deliveries recover one receipt, including after lost acknowledgement
|
|
42
|
-
or journal reopen. Historical receipt retrieval requires current validation permission;
|
|
43
|
-
it does not reverse later invalidation or prove that coverage remains validating now.
|
|
44
|
-
Revalidation of a replacement definition uses a new token and preserves its advanced
|
|
45
|
-
invalidation epoch. Keep the original frozen plan alongside the receipt: the digest
|
|
46
|
-
binds that plan but does not make the receipt an executable bundle.
|
|
47
|
-
|
|
48
|
-
The index is bounded to 500 structural records per scope and refuses exhaustion rather
|
|
49
|
-
than dropping history. Existing journals read with empty structural history. The earlier
|
|
50
|
-
`initialize` API remains a trusted-host import of an already structurally validated
|
|
51
|
-
scenario; it does not produce this receipt and requires the host to establish both
|
|
52
|
-
promotion and validation authority before calling it.
|
|
53
|
-
|
|
54
|
-
This is protected local single-writer storage. It does not install hosted IAM, physical
|
|
55
|
-
state leases, hosted source promotion, CLI lifecycle commands, live qualification or
|
|
56
|
-
activation. Tests use real journal bytes and static compilation; one positive test then
|
|
57
|
-
executes two newly admitted native cells. Host/source/review/effect authority is explicitly
|
|
58
|
-
simulated, and structural success alone is never reported as application success.
|
package/docs/source-promotion.md
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# Promoting an approved source plan
|
|
2
|
-
|
|
3
|
-
`promoteScenario(ports, intent, definition, selections)` registers an approved source
|
|
4
|
-
scenario as `proposed`. It returns a sealed `workflow.scenario-promotion/v1` manifest.
|
|
5
|
-
It creates no plan approval, structural validation, runtime PASS or active coverage.
|
|
6
|
-
|
|
7
|
-
The intent names the scenario, immutable definition and selection refs, exact editable
|
|
8
|
-
plan revision token, and scoped idempotency key. The definition binds the source plan
|
|
9
|
-
and current review. Promotion requires the stored review to be approved for that exact
|
|
10
|
-
plan/edit revision and to retain its atomically stored source validation. Each promoted
|
|
11
|
-
case must belong to approved runnable candidates whose source elements were independently
|
|
12
|
-
validated. Blocked/excluded candidates and non-scenario plan dispositions cannot become
|
|
13
|
-
promoted cases. The matrix and every supplied selection retain the exact case/persona/
|
|
14
|
-
target strata and policy.
|
|
15
|
-
|
|
16
|
-
```ts
|
|
17
|
-
const ports = scenarios.promotionPorts(reviews, { authorizePromotion });
|
|
18
|
-
const manifest = await promoteScenario(ports, {
|
|
19
|
-
scenarioId,
|
|
20
|
-
definitionRef: definition.ref,
|
|
21
|
-
reviewToken,
|
|
22
|
-
selectionManifestRefs: selections.map(selection => selection.ref),
|
|
23
|
-
idempotencyKey,
|
|
24
|
-
}, definition, selections);
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
`LocalReviewStore.approvedSnapshot(ledger, token, reviewRef)` resolves actual approved
|
|
28
|
-
storage on the same writer. It requires current review authority without writing a
|
|
29
|
-
review or approving anything. Its documents are copies; its runtime `assertCurrent`
|
|
30
|
-
checks the review aggregate version. The local promotion adapter resolves that snapshot
|
|
31
|
-
again inside its commit, compares the submitted context, rechecks creation/promotion
|
|
32
|
-
authority and verifies both review and scenario versions after the final await.
|
|
33
|
-
One synced scenario-registry entry contains the proposed definition, selections,
|
|
34
|
-
manifest, full reviewed plan, review and source-validation snapshot. Gaps, withheld
|
|
35
|
-
flows, excluded candidates and diagnostics remain in that immutable snapshot.
|
|
36
|
-
|
|
37
|
-
The manifest binds the review/source-validation refs and storage version as well as
|
|
38
|
-
the authenticated promoter and policy. Selection order is normalized. Repeated or
|
|
39
|
-
concurrent identical intent returns one manifest; a changed scoped key binding or an
|
|
40
|
-
attempt to overwrite an existing scenario conflicts. A pre-write failure publishes
|
|
41
|
-
nothing; a lost acknowledgement recovers the committed manifest after reopen. The
|
|
42
|
-
registry's existing 100-scenario bound applies. Older journals have no promotion record.
|
|
43
|
-
|
|
44
|
-
## Current review checks after promotion
|
|
45
|
-
|
|
46
|
-
Bind the current review owner once when constructing a source-backed local scenario store:
|
|
47
|
-
|
|
48
|
-
```ts
|
|
49
|
-
const scenarios = new LocalScenarioStore(ledger, scenarioId, scope, {
|
|
50
|
-
reviewStore: reviews,
|
|
51
|
-
authorize,
|
|
52
|
-
validateDefinition: validateReplayPolicyAndTarget,
|
|
53
|
-
validateStateLeases,
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
`reviewStore` is required when a definition names a source plan. It must own the same
|
|
58
|
-
ledger. The store checks its exact current approved review and independently validated
|
|
59
|
-
runnable cases in addition to the host's replay/target/policy checks. Initialize,
|
|
60
|
-
structural validation, round registration and activation hold its synchronous version
|
|
61
|
-
fence through their last awaited authorization and assert it immediately before the
|
|
62
|
-
registry write. An edit during that await publishes no transition.
|
|
63
|
-
|
|
64
|
-
An edit clears the current plan review. These guards then refuse later structural,
|
|
65
|
-
qualification and activation admission against the old review. Use `invalidateScenario`
|
|
66
|
-
with a replacement definition to advance its epoch and clear activation. Historical
|
|
67
|
-
promotion retries return the original receipt without renewing approval or altering
|
|
68
|
-
the scenario. Promotion registers new entries; replacing an existing scenario remains
|
|
69
|
-
an explicit semantic edit and review flow.
|
|
70
|
-
|
|
71
|
-
All ports belong to the trusted host. A saved source plan or producer-supplied approval
|
|
72
|
-
object cannot supply them. Protect the state directory and synchronize external IAM,
|
|
73
|
-
revocation and provider fencing with the controller. Local hashes and receipts do not
|
|
74
|
-
establish a hosted issuer or deployed revision. Source-bound activation still requires
|
|
75
|
-
independent runtime revision proof; source inspection alone cannot grant it.
|
|
76
|
-
|
|
77
|
-
## Execute the reviewed revision
|
|
78
|
-
|
|
79
|
-
Use the compiler's `--source-snapshot` and `--source-repository-role` options to bind
|
|
80
|
-
the complete resolver-head snapshot before selecting, reviewing and promoting cases.
|
|
81
|
-
The approved source plan must name that exact resolver matrix. A different matrix
|
|
82
|
-
ref is rejected even when its commits happen to match. Component-only source runs
|
|
83
|
-
can still execute, but cannot establish revision qualification.
|
|
84
|
-
|
|
85
|
-
`prepareQualificationExecution` reads current source review evidence through the
|
|
86
|
-
scenario owner and carries copies of the sealed plan, approved review and source
|
|
87
|
-
validation into the frozen execution documents. It leaves the original trial plan
|
|
88
|
-
unchanged. Each effect authorization resolves current owner state again, including
|
|
89
|
-
after awaited effect permission. The controller never obtains approval from the
|
|
90
|
-
copied documents.
|
|
91
|
-
|
|
92
|
-
Preflight and saved-bundle checks use `validateReviewedSourceDocuments` to check seals,
|
|
93
|
-
scope, plan/review/validation links and the selected matrix. The same pure schema is
|
|
94
|
-
shared with promotion. Saved evidence proves the recorded relationships; the owning
|
|
95
|
-
review store determines current approval. Historical bundles remain readable after
|
|
96
|
-
an edit, while new execution and activation require current authority.
|
|
97
|
-
|
|
98
|
-
Tests compose immutable Git reads, an actual bounded TypeScript AST predicate, source
|
|
99
|
-
validation, durable review, promotion, structural validation, two independently admitted
|
|
100
|
-
native revision rounds and atomic activation, including reopen recovery and source-edit
|
|
101
|
-
races at the final structural, registration and activation boundaries.
|
|
102
|
-
Authentication, coverage policy, physical leases and issuer authority are explicitly
|
|
103
|
-
simulated. The AST oracle proves a declared POST branch only. These proofs do not
|
|
104
|
-
establish full semantic coverage, a deployed source tuple or hosted qualification.
|
package/docs/source-review.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Source-backed plan review
|
|
2
|
-
|
|
3
|
-
`validatePlanSources` checks a sealed source plan against its exact change model and revision matrix. It authorizes each repository, hashes the fetched full diff, resolves citations only at selected immutable commits, and reuses `verifySourceCitation` for file/excerpt checks. A modified working checkout cannot substitute for unavailable selected source.
|
|
4
|
-
|
|
5
|
-
Runnable derivations need confirmed metadata, citations, and nonempty evidence from a registered independent AST/schema/route oracle. Confidence and a proposed `confirmed` label do not establish that evidence. Failed/partial/unsupported extraction retains diagnostic refs as plan gaps. The trusted coverage policy checks frozen requirements, unresolved questions, excluded material and no-E2E reasoning. Source checks never produce runtime PASS, qualification or activation.
|
|
6
|
-
|
|
7
|
-
Trusted host integration:
|
|
8
|
-
|
|
9
|
-
```ts
|
|
10
|
-
const reviewPorts: PlanReviewPorts = {
|
|
11
|
-
...authenticatedReviewAndStorage,
|
|
12
|
-
validateSources: (plan, policyRef) => validatePlanSources(sourcePorts, plan, policyRef),
|
|
13
|
-
};
|
|
14
|
-
const reviewed = await reviewPlan(reviewPorts, revisionToken, 'approved', reasonRefs);
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
All ports belong to the authenticated host. A candidate, plugin or authoring model cannot supply its own source checker, oracle or coverage policy. Revision policy must explicitly admit a missing merge base and its alternative diff method. A full diff over 4 MiB, over 500 distinct runnable citations, unavailable objects, mismatched refs or denied authority block validation rather than truncate source.
|
|
18
|
-
|
|
19
|
-
Approval requires a sealed `workflow.source-validation/v1` result binding the same plan, change model, matrix, scope and admitted review policy. Its ref is included in the immutable review's reason refs. The host's `compareAndSwap` must publish that validation record, review and projection in one atomic write. A losing write publishes none of them. Rejection requires no fabricated successful source check. An edit still clears the current review; historical validation records remain evidence of their original source digests.
|
|
20
|
-
|
|
21
|
-
This changes the experimental `PlanReviewPorts` contract: approved reviews require `validateSources`, and `compareAndSwap` receives a fourth validation argument. Persist it atomically; ignoring it is not a conforming host. [Local review storage](local-review-store.md) persists its records and [source promotion](source-promotion.md) binds current approved storage to a proposed scenario. This review API installs no hosted source registry or production oracle. Qualification execution requires a separately registered runtime owner; activated regression execution remains blocked.
|