@cassiomc1/forgeloop 1.13.0 → 1.14.0
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/AGENT_COMPATIBILITY.md +8 -0
- package/DOCS_INDEX.md +35 -3
- package/ENG/nodejs-backend-development-eng.md +2 -2
- package/ENG/sec-code-eng.md +7 -7
- package/EXECUTION_STATE.md +12 -0
- package/LOOP_ENGINEERING.md +28 -2
- package/ORCHESTRATOR_INTEGRATION.md +9 -5
- package/PROTOCOL_INTEGRATION.md +55 -2
- package/README.md +40 -25
- package/TERMINOLOGY.md +2 -0
- package/THREAT_MODEL.md +140 -1
- package/completions/_forgeloop +19 -1
- package/completions/forgeloop.bash +37 -1
- package/completions/forgeloop.fish +123 -1
- package/docs/ADVISORY_CONTEXT.md +25 -0
- package/docs/AGENT_BROWSER_ADAPTER.md +81 -0
- package/docs/AGENT_BROWSER_VERIFICATION.md +6 -0
- package/docs/AGENT_PROTOCOL_SUMMARY.md +27 -2
- package/docs/AGENT_SKILL.md +66 -0
- package/docs/ARTIFACT_REFERENCE.md +123 -0
- package/docs/AUDIT_UX.md +46 -0
- package/docs/BROWSER_VERIFICATION.md +136 -0
- package/docs/CLI_REFERENCE.md +366 -6
- package/docs/CODE_ATTESTATION.md +2 -2
- package/docs/DOCUMENTATION_GUIDE.md +32 -11
- package/docs/JEV_BENCHMARKS.md +31 -0
- package/docs/MODEL_ROUTING.md +37 -0
- package/docs/OPENSRC_ADAPTER.md +241 -0
- package/docs/PACKAGE_CONTENTS.md +35 -8
- package/docs/PROVIDERS.md +126 -0
- package/docs/PROVIDER_ARCHITECTURE.md +199 -0
- package/docs/RECIPES.md +9 -0
- package/docs/RELEASE_CHECKLIST.md +38 -5
- package/docs/SECURITY_REVIEW.md +71 -0
- package/docs/SEMANTIC_DECISION_PLANE.md +71 -0
- package/docs/TEST_INTELLIGENCE.md +29 -0
- package/docs/TEST_PRUNING.md +14 -0
- package/docs/TROUBLESHOOTING.md +198 -1
- package/docs/UNIVERSAL_INTEGRATION.md +31 -0
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +2 -2
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +5 -5
- package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +1 -1
- package/docs/assets/diagrams/forgeloop-engineering-flow.html +39 -26
- package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
- package/docs/assets/diagrams/forgeloop-engineering-flow.svg +26 -26
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +2 -1
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +5 -5
- package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +1 -1
- package/docs/diagrams/README.md +13 -9
- package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +1 -1
- package/docs/diagrams/forgeloop-engineering-flow.workflow.json +24 -19
- package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +1 -0
- package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
- package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
- package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
- package/docs/documentation-manifest.json +750 -5
- package/docs/protocol-requirements.json +24 -0
- package/package.json +30 -3
- package/schemas/config.schema.json +14 -0
- package/schemas/context-plan.schema.json +18 -0
- package/schemas/semantic-decision.schema.json +46 -0
- package/schemas/test-utility.schema.json +44 -0
- package/scripts/CI_VALIDATORS.md +6 -6
- package/scripts/benchmark-jev.mjs +5 -0
- package/scripts/benchmark-test-intelligence.mjs +4 -0
- package/scripts/generate-agent-protocol-summary.mjs +4 -1
- package/scripts/generate-forgeloop-skill.mjs +133 -0
- package/scripts/jev-smoke.mjs +19 -0
- package/skills/forgeloop/README.md +9 -0
- package/skills/forgeloop/SKILL.md +77 -0
- package/skills/forgeloop/references/lifecycle.md +9 -0
- package/skills/forgeloop/references/recovery.md +7 -0
- package/skills/forgeloop/references/verification.md +7 -0
- package/src/adapters/agent-browser/assertions.js +47 -0
- package/src/adapters/agent-browser/commands.js +54 -0
- package/src/adapters/agent-browser/index.js +3 -0
- package/src/adapters/agent-browser/locator.js +40 -0
- package/src/adapters/agent-browser/process.js +215 -0
- package/src/adapters/agent-browser/provider.js +313 -0
- package/src/adapters/emulated-services/constants.js +24 -0
- package/src/adapters/emulated-services/index.js +7 -0
- package/src/adapters/emulated-services/process.js +162 -0
- package/src/adapters/emulated-services/provider.js +282 -0
- package/src/adapters/opensrc/normalize.js +90 -0
- package/src/adapters/opensrc/process.js +248 -0
- package/src/adapters/opensrc/provider.js +338 -0
- package/src/adapters/opensrc/search.js +264 -0
- package/src/adapters/typesafe/client.js +28 -0
- package/src/adapters/typesafe/engine.js +63 -0
- package/src/adapters/typesafe/normalize.js +41 -0
- package/src/cli.js +108 -0
- package/src/commands/checkpoint-revalidate.js +176 -0
- package/src/commands/context-plan.js +38 -0
- package/src/commands/contract-create.js +264 -0
- package/src/commands/contract-revise.js +236 -0
- package/src/commands/decision-show.js +14 -0
- package/src/commands/decision-status.js +22 -0
- package/src/commands/discover.js +41 -0
- package/src/commands/doctor.js +15 -0
- package/src/commands/gate-record.js +205 -0
- package/src/commands/gate-revalidate.js +137 -0
- package/src/commands/model-route.js +32 -0
- package/src/commands/route.js +146 -18
- package/src/commands/semantic-plan.js +17 -0
- package/src/commands/task-abandon.js +224 -0
- package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
- package/src/commands/task-repair-contract-bootstrap.js +263 -0
- package/src/commands/test-inventory.js +5 -0
- package/src/commands/test-prune-plan.js +5 -0
- package/src/commands/test-prune-probe.js +5 -0
- package/src/commands/test-utility.js +5 -0
- package/src/commands/validate-protocol.js +10 -1
- package/src/core/artifact-registry.js +24 -0
- package/src/core/audit-ux.js +514 -0
- package/src/core/browser-verification/constants.js +149 -0
- package/src/core/browser-verification/normalize.js +254 -0
- package/src/core/browser-verification/provider.js +519 -0
- package/src/core/browser-verification/service.js +115 -0
- package/src/core/checkpoint-revalidation.js +319 -0
- package/src/core/cli-command-definitions.js +241 -0
- package/src/core/command-executors.js +110 -0
- package/src/core/command-input.js +115 -43
- package/src/core/completion-artifacts.js +14 -5
- package/src/core/completion.js +4 -6
- package/src/core/config.js +3 -0
- package/src/core/context-compiler/budget.js +9 -0
- package/src/core/context-compiler/candidates.js +39 -0
- package/src/core/context-compiler/compiler.js +63 -0
- package/src/core/context-compiler/fingerprint.js +11 -0
- package/src/core/context-compiler/policy.js +13 -0
- package/src/core/context-compiler/result.js +23 -0
- package/src/core/contract-bootstrap-recovery.js +655 -0
- package/src/core/contract-revision.js +210 -0
- package/src/core/decision/artifact.js +69 -0
- package/src/core/decision/benchmarks.js +103 -0
- package/src/core/decision/cache.js +27 -0
- package/src/core/decision/constants.js +58 -0
- package/src/core/decision/cutover.js +34 -0
- package/src/core/decision/engine.js +22 -0
- package/src/core/decision/errors.js +68 -0
- package/src/core/decision/events.js +101 -0
- package/src/core/decision/freshness.js +19 -0
- package/src/core/decision/normalizers/index.js +115 -0
- package/src/core/decision/policy.js +18 -0
- package/src/core/decision/projection.js +16 -0
- package/src/core/decision/question-registry.js +201 -0
- package/src/core/decision/request.js +26 -0
- package/src/core/decision/resolver.js +130 -0
- package/src/core/decision/result.js +58 -0
- package/src/core/decision/service.js +156 -0
- package/src/core/decision/state-builder.js +65 -0
- package/src/core/decision/task-bindings.js +30 -0
- package/src/core/decision/test-provider.js +32 -0
- package/src/core/decision/thresholds.js +15 -0
- package/src/core/error-codes.js +278 -0
- package/src/core/events.js +226 -57
- package/src/core/evidence-readiness.js +9 -0
- package/src/core/execution-prerequisites.js +14 -0
- package/src/core/execution-profile.js +63 -38
- package/src/core/gate-provenance.js +124 -0
- package/src/core/integration-invocation-policy.js +27 -4
- package/src/core/integration-resources.js +86 -61
- package/src/core/model-router/constants.js +10 -0
- package/src/core/model-router/policy.js +103 -0
- package/src/core/model-router/router.js +37 -0
- package/src/core/next-action-model.js +58 -0
- package/src/core/next-action-phases.js +130 -42
- package/src/core/next-action-refresh.js +43 -9
- package/src/core/next-action-review-phase.js +7 -2
- package/src/core/next-action.js +35 -7
- package/src/core/phase.js +128 -10
- package/src/core/preflight-consistency.js +23 -9
- package/src/core/preflight-loaders.js +37 -5
- package/src/core/protocol-info.js +65 -0
- package/src/core/protocol.js +20 -0
- package/src/core/reconcile-closure.js +128 -52
- package/src/core/recovery-history.js +1 -0
- package/src/core/resumability.js +154 -44
- package/src/core/route-artifact.js +15 -1
- package/src/core/router.js +67 -1
- package/src/core/runtime-context.js +118 -61
- package/src/core/schema-validation.js +3 -0
- package/src/core/security-review/constants.js +64 -0
- package/src/core/security-review/normalize.js +245 -0
- package/src/core/security-review/provider.js +204 -0
- package/src/core/security-review/service.js +134 -0
- package/src/core/semantic-planning/constants.js +19 -0
- package/src/core/semantic-planning/projection.js +94 -0
- package/src/core/semantic-planning/service.js +15 -0
- package/src/core/sources.js +37 -0
- package/src/core/task-claim-state.js +201 -1
- package/src/core/task-conflict-inspection.js +31 -5
- package/src/core/task-paths.js +13 -0
- package/src/core/task-recovery.js +1 -0
- package/src/core/templates.js +3 -0
- package/src/core/test-intelligence/benchmarks.js +68 -0
- package/src/core/test-intelligence/inventory.js +73 -0
- package/src/core/test-intelligence/prune.js +90 -0
- package/src/core/test-intelligence/semantic-state.js +15 -0
- package/src/core/test-intelligence/service.js +40 -0
- package/src/core/test-intelligence/utility.js +50 -0
- package/src/core/trace.js +11 -7
- package/src/core/transaction.js +1 -0
- package/src/integration.d.ts +492 -0
- package/src/integration.js +54 -0
- package/src/providers/README.md +47 -0
- package/src/providers/capabilities.js +46 -0
- package/src/providers/errors.js +15 -0
- package/src/providers/index.js +29 -0
- package/src/providers/json-snapshot.js +105 -0
- package/src/providers/registry.js +152 -0
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
This is the current release checklist for `@cassiomc1/forgeloop`. It is a
|
|
4
4
|
preparation and verification checklist; it does not authorize publication.
|
|
5
5
|
|
|
6
|
-
## ForgeLoop 1.
|
|
6
|
+
## ForgeLoop 1.14.0 candidate scope
|
|
7
7
|
|
|
8
|
-
The 1.
|
|
9
|
-
|
|
8
|
+
The 1.14.0 candidate carries the protocol, routing, provider, documentation,
|
|
9
|
+
and package changes present in current `main`. The candidate must keep these
|
|
10
10
|
boundaries explicit:
|
|
11
11
|
|
|
12
12
|
- [ ] README catalog and architecture fallback identify
|
|
@@ -47,7 +47,19 @@ actions.
|
|
|
47
47
|
|
|
48
48
|
## CI minimization validation
|
|
49
49
|
|
|
50
|
+
- [ ] `npm run skill:check` passes and generated Skill frontmatter, protocol
|
|
51
|
+
synchronization, safety boundaries, and package coverage remain valid.
|
|
52
|
+
|
|
50
53
|
- [ ] `npm run verify:fast` passes for edit-time feedback.
|
|
54
|
+
- [ ] `npm run repository:hygiene` passes: no tracked mutable ForgeLoop state,
|
|
55
|
+
unexpected root reports, orphan visual assets, unapproved benchmark run
|
|
56
|
+
sets, or scratch outputs.
|
|
57
|
+
- [ ] The documentation manifest and review matrix cover every maintained and
|
|
58
|
+
packaged document with origin, currency, package, action, and canonical
|
|
59
|
+
source metadata.
|
|
60
|
+
- [ ] Diagram source, generated output, receipts, and review bindings are
|
|
61
|
+
current; a changed source is not approved until its visual review is
|
|
62
|
+
renewed.
|
|
51
63
|
- [ ] `npm run verify:prepush` passes before the release pull request; MCP
|
|
52
64
|
setup, when needed, was run explicitly with `npm run mcp:setup`.
|
|
53
65
|
- [ ] Ordinary PR validation uses `.github/workflows/pr-core.yml` with the
|
|
@@ -86,7 +98,27 @@ actions.
|
|
|
86
98
|
- [ ] `protocol-info` and the Integration API capability contracts agree.
|
|
87
99
|
- [ ] `canonicalHandoffs` v2 is advertised consistently.
|
|
88
100
|
- [ ] `advisoryContextProviders` v1 is advertised consistently.
|
|
101
|
+
- [ ] `providerExtensions` v1 is consistent, provider-neutral, experimental,
|
|
102
|
+
and retains false lifecycle/completion/evidence authority.
|
|
103
|
+
- [ ] Generic provider registry export remains absent and auto-install remains
|
|
104
|
+
false.
|
|
89
105
|
- [ ] Advisory context remains Integration-API-only.
|
|
106
|
+
- [ ] OpenSrc requires an explicit absolute executable path and lazily qualified expected version.
|
|
107
|
+
- [ ] OpenSrc cache remains outside the target project and returned source paths are containment-validated.
|
|
108
|
+
- [ ] OpenSrc recall remains advisory, non-evidence, and non-persisted by ForgeLoop.
|
|
109
|
+
- [ ] No OpenSrc binary or cache ships in npm.
|
|
110
|
+
- [ ] Optional Agent Browser uses a host-supplied absolute executable, has no
|
|
111
|
+
runtime dependency, and keeps browser observations non-authoritative.
|
|
112
|
+
- [ ] Optional Emulated Services uses a host-supplied absolute `0.11.2`
|
|
113
|
+
executable, has no runtime dependency or PATH discovery, bounds argv
|
|
114
|
+
execution/readiness/output/cleanup, keeps state outside the target, and
|
|
115
|
+
returns observation-only loopback results.
|
|
116
|
+
- [ ] Optional Security Review is host-injected through `securityReviewProviders`,
|
|
117
|
+
has no auto-install or scanner discovery, and keeps findings
|
|
118
|
+
observation-only, non-evidence, non-lifecycle, and non-completion.
|
|
119
|
+
- [ ] Security Review request/result bounds, strict snapshot validation,
|
|
120
|
+
shared timeout, and cooperative cancellation are covered by focused tests
|
|
121
|
+
and the public TypeScript declarations.
|
|
90
122
|
- [ ] `next`, `status`, and `task/context` invoke zero advisory providers.
|
|
91
123
|
- [ ] Advisory request budgets are normalized before provider invocation.
|
|
92
124
|
- [ ] Advisory results are never persisted by ForgeLoop.
|
|
@@ -97,8 +129,9 @@ actions.
|
|
|
97
129
|
- [ ] Stale contract/route identity rejects handoff creation or acceptance.
|
|
98
130
|
- [ ] An invalid event ledger projects `INCONSISTENT`.
|
|
99
131
|
- [ ] Continuity lint remains non-authoritative and non-evidence.
|
|
100
|
-
- [ ] `npm run dependency:policy` passes with only the approved exact
|
|
101
|
-
|
|
132
|
+
- [ ] `npm run dependency:policy` passes with only the approved exact
|
|
133
|
+
`@typesafe-ai/sdk` and `smol-toml` runtime dependencies and approved
|
|
134
|
+
development dependencies.
|
|
102
135
|
- [ ] `npm run lint` passes.
|
|
103
136
|
- [ ] `npm test` passes.
|
|
104
137
|
- [ ] `npm run benchmark:profiles:check` passes; absent provider/host history
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Security Review Provider
|
|
2
|
+
|
|
3
|
+
The Security Review provider is an optional, host-injected Integration API
|
|
4
|
+
capability for bounded, observation-only security findings. It is deliberately
|
|
5
|
+
separate from ForgeLoop lifecycle, evidence, completion, claim, ownership,
|
|
6
|
+
installation, command, and transaction authority.
|
|
7
|
+
|
|
8
|
+
## Registration
|
|
9
|
+
|
|
10
|
+
Register providers on `createForgeLoopContext({ securityReviewProviders })`.
|
|
11
|
+
The registry accepts an object or `Map`, and each value is either a provider
|
|
12
|
+
or a lazy factory. Registration validates provider identity but does not invoke
|
|
13
|
+
factories, scan the project, start a process, access the network, install a
|
|
14
|
+
tool, or mutate `.forgeloop` state.
|
|
15
|
+
|
|
16
|
+
Provider IDs are lower-case portable identifiers. A provider must expose the
|
|
17
|
+
same `id` as its registry key and a `review(request)` function. The host owns
|
|
18
|
+
the provider implementation and any scanner or executable it uses; ForgeLoop
|
|
19
|
+
does not discover tools or search `PATH`.
|
|
20
|
+
|
|
21
|
+
## Invocation
|
|
22
|
+
|
|
23
|
+
Call `runSecurityReview({ projectPath, taskId, providerName, reviewId, ... })`
|
|
24
|
+
through `@cassiomc1/forgeloop/integration`. Requests are detached and deeply
|
|
25
|
+
frozen before invocation. The request supports `FULL`, `CHANGED`, or
|
|
26
|
+
`SELECTED` scope, bounded relative paths, categories, requirements, an
|
|
27
|
+
optional revision binding, and a timeout capped by ForgeLoop.
|
|
28
|
+
|
|
29
|
+
Factory resolution and `review()` share one deadline and one cooperative
|
|
30
|
+
`AbortSignal`. A caller may provide its own signal. Timeout, cancellation,
|
|
31
|
+
provider absence, invalid providers, malformed results, output limits, and
|
|
32
|
+
provider failures have stable `E_SECURITY_REVIEW_*` error codes. Provider
|
|
33
|
+
exceptions are normalized so provider code cannot spoof ForgeLoop errors.
|
|
34
|
+
|
|
35
|
+
## Result contract
|
|
36
|
+
|
|
37
|
+
Results are detached, deeply frozen JSON observations with bounded findings,
|
|
38
|
+
diagnostics, and summary counts. The raw provider snapshot is also bounded
|
|
39
|
+
before schema projection: nesting is limited to 32 levels, traversal to 4096
|
|
40
|
+
nodes, and snapshot strings/keys to 524288 characters. Exceeding any bound
|
|
41
|
+
fails closed with `E_SECURITY_REVIEW_OUTPUT_LIMIT`.
|
|
42
|
+
|
|
43
|
+
Each finding has a portable relative path, bounded title/summary/rule/category/
|
|
44
|
+
severity/confidence fields, and no secret-like content. For `SELECTED` scope,
|
|
45
|
+
each finding path must equal or be a descendant of one of the requested paths;
|
|
46
|
+
`CHANGED` applies the same rule when an explicit changed-path set is supplied.
|
|
47
|
+
Containment uses normalized `/` separators and path-component boundaries, so
|
|
48
|
+
`src/auth.js` does not authorize `src/authentication.js`. `FULL` scope has no
|
|
49
|
+
requested-path restriction beyond normal safe-path validation. Results carry
|
|
50
|
+
trust metadata stating that they are observation-only and non-evidence.
|
|
51
|
+
|
|
52
|
+
Provider output is not a pass/fail lifecycle decision. It cannot create or
|
|
53
|
+
modify contracts, routes, gates, events, transactions, receipts, claims,
|
|
54
|
+
ownership, completion, executable commands, shell operations, credentials, or
|
|
55
|
+
installation state. Any future use as canonical evidence requires a separate
|
|
56
|
+
ForgeLoop-owned validation and evidence contract.
|
|
57
|
+
|
|
58
|
+
## Operational rules
|
|
59
|
+
|
|
60
|
+
- Keep registration lazy and explicit.
|
|
61
|
+
- Use a host-owned provider and a bounded request.
|
|
62
|
+
- Treat findings as advisory observations, not proof of `VALID`, `COMPLETE`,
|
|
63
|
+
or any lifecycle phase.
|
|
64
|
+
- Handle timeout and cancellation cooperatively and clean up resources owned by
|
|
65
|
+
the provider.
|
|
66
|
+
- Do not persist provider output as ForgeLoop task state unless a future
|
|
67
|
+
canonical evidence contract explicitly defines that boundary.
|
|
68
|
+
|
|
69
|
+
See [`PROVIDER_ARCHITECTURE.md`](./PROVIDER_ARCHITECTURE.md),
|
|
70
|
+
[`PROVIDERS.md`](./PROVIDERS.md), and [`THREAT_MODEL.md`](../THREAT_MODEL.md)
|
|
71
|
+
for shared provider and security-boundary rules.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Semantic Decision Plane
|
|
2
|
+
|
|
3
|
+
ForgeLoop uses the pinned TypeSafe Jev model `jev-1.13.0` for bounded semantic decisions. The SDK version is exact-pinned in `package.json` and credentials are read only from `TYPESAFE_API_KEY`; credentials are never persisted in ForgeLoop artifacts, event details, diagnostics, or logs.
|
|
4
|
+
|
|
5
|
+
Jev output has `SEMANTIC_DECISION` authority and `NONE` evidence authority. It cannot advance lifecycle, change ownership, satisfy gates, record verification, mark completion, install dependencies, execute commands, or delete tests. ForgeLoop remains the deterministic authority for state, claims, locks, schemas, event chronology, evidence, recovery, and completion.
|
|
6
|
+
|
|
7
|
+
The decision registry contains versioned question sets for intake, contract
|
|
8
|
+
applicability, route, execution profile, context, model routing, failure triage,
|
|
9
|
+
diagnosis, review, task overlap, test utility, and test pruning. Current route,
|
|
10
|
+
context, and test-utility mutations also use bounded dynamic candidate question
|
|
11
|
+
sets: `route-candidates-v1`, `context-candidates-v1`, and
|
|
12
|
+
`test-utility-candidates-v1`. Failure triage, diagnosis prioritization, and review planning
|
|
13
|
+
remain advisory projections: deterministic mandatory review signals are always
|
|
14
|
+
unioned into the plan, unknown semantic output escalates, and no projection can
|
|
15
|
+
record evidence or authorize an action.
|
|
16
|
+
|
|
17
|
+
Decision freshness separates canonical lifecycle state from semantic request
|
|
18
|
+
state. Persisted artifacts retain both fingerprints and their combined request
|
|
19
|
+
fingerprint, so lifecycle mutations cannot be mistaken for semantic changes
|
|
20
|
+
and semantic changes cannot be hidden by a stable lifecycle revision. The
|
|
21
|
+
lifecycle, event ledger, claims, and artifact validators remain authoritative.
|
|
22
|
+
|
|
23
|
+
Test utility analysis uses the bounded `test-utility-candidates-v1` question set
|
|
24
|
+
for the current command path; `test-utility-v1` remains a registered base
|
|
25
|
+
question set. The analysis is persisted separately from
|
|
26
|
+
completion evidence. Protected, contract-linked, public-API, security, and
|
|
27
|
+
protocol tests remain keep-required or keep-risk-guard candidates; unknown
|
|
28
|
+
utility is blocked and no command performs deletion.
|
|
29
|
+
|
|
30
|
+
Context plans send bounded, sanitized actual candidates to Jev. The candidate-set
|
|
31
|
+
fingerprint is bound to the persisted decision, and Jev returns candidate ranking
|
|
32
|
+
and exclusion judgments consumed by the context compiler. Deterministic required
|
|
33
|
+
and mandatory candidates remain selected; prompt-injection candidates are never
|
|
34
|
+
given semantic authority. Token values are `UNKNOWN` unless the provider or host
|
|
35
|
+
reports them.
|
|
36
|
+
|
|
37
|
+
Route execution records intake, route relevance, and execution-profile decisions
|
|
38
|
+
before persisting the route. The deterministic router remains the eligibility
|
|
39
|
+
and safety floor; Jev may rank or exclude only eligible non-mandatory guides and
|
|
40
|
+
may raise the execution profile, never lower a deterministic safety floor.
|
|
41
|
+
Mandatory safety protection is derived from the canonical deterministic route
|
|
42
|
+
reasons already produced by the router (`isMandatorySafetyGuide` reads the
|
|
43
|
+
`MANDATORY_SAFETY_REASONS` set — `SURFACE_AUTH` plus the trust-boundary risk
|
|
44
|
+
reasons `RISK_UNTRUSTED_INPUT`, `RISK_PERSONAL_DATA`, `RISK_SECRETS`,
|
|
45
|
+
`RISK_EXTERNAL_SERVICE`, `RISK_PUBLICATION`), so a security guide selected for an
|
|
46
|
+
external-service boundary cannot be removed by Jev and retains an explicit
|
|
47
|
+
`MANDATORY_SAFETY_GUIDE` reason. Mandatory safety guides and low-confidence
|
|
48
|
+
exclusions remain selected. A missing live decision fails closed.
|
|
49
|
+
|
|
50
|
+
The semantic provider is injected into repository tests through an internal
|
|
51
|
+
loader only. There is no production environment switch that turns semantic
|
|
52
|
+
decisions into fixture results; packaged commands without the pinned provider
|
|
53
|
+
fail closed.
|
|
54
|
+
|
|
55
|
+
`npm run jev:smoke` performs only a tiny health request when credentials are configured. A missing credential reports `NOT_RUN`; an unavailable or rate-limited service is a failed live check, never a fabricated success. Provider failures are classified into stable error codes (authentication, unsupported model, rate limit, timeout, result normalization) and, for live maintainer diagnostics, the smoke result additionally reports only safe metadata (HTTP status, provider error type, request id, network class) — never credentials, headers, or raw request bodies. Inspection, recovery, and completion validation do not require a live Jev call, but a semantic-required mutation fails closed when its canonical decision is missing or stale.
|
|
56
|
+
|
|
57
|
+
The `INTAKE` and `CONTRACT_APPLICABILITY` checkpoints are observation-only in
|
|
58
|
+
this version. Their immutable decisions are recorded, fingerprinted, and
|
|
59
|
+
available for review and follow-up consumption, but their result does not
|
|
60
|
+
currently alter the route or create, skip, or weaken the contract: Jev never
|
|
61
|
+
removes user or deterministic signals, and a semantic `applicable: false` can
|
|
62
|
+
never suppress a deterministic contract requirement. A narrow additive consumer
|
|
63
|
+
was evaluated and deferred because it changes behavior across every provider
|
|
64
|
+
mode without a validated benefit; semantic consumption is tracked as a
|
|
65
|
+
follow-up task, not claimed as current routing quality.
|
|
66
|
+
|
|
67
|
+
Semantic-required operations use fail-closed cutover semantics: an unavailable,
|
|
68
|
+
stale, malformed, or unsupported decision cannot silently authorize a mutation.
|
|
69
|
+
Offline inspection, recovery, and deterministic completion validation remain
|
|
70
|
+
usable without a live Jev request. Cached decisions may be used only when their
|
|
71
|
+
existing fingerprint/freshness validators accept them.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Test intelligence
|
|
2
|
+
|
|
3
|
+
ForgeLoop discovers test units deterministically and assigns stable IDs from
|
|
4
|
+
framework, path, suite, and trimmed name. Utility analysis is non-evidence
|
|
5
|
+
data. The task-bound utility command sends bounded batches of actual test
|
|
6
|
+
metadata (including source summary, target file, framework, signals, and
|
|
7
|
+
runtime or branch-coverage fields when present; deterministic inventory
|
|
8
|
+
currently supplies them as `null`) to canonical Jev `TEST_UTILITY` decisions.
|
|
9
|
+
Each test receives its own bounded semantic judgment. Protected or
|
|
10
|
+
contract-linked tests are never prune-authorized, and missing or low-confidence
|
|
11
|
+
utility remains blocked.
|
|
12
|
+
|
|
13
|
+
An unprotected semantic duplicate with sufficient confidence is classified as a
|
|
14
|
+
`REDUNDANT_CANDIDATE` and may reach the isolated `PROBE_REMOVAL` stage. The
|
|
15
|
+
probe is non-destructive and does not authorize deletion; protected tests,
|
|
16
|
+
low-confidence candidates, unknown utility, and candidates requiring a second
|
|
17
|
+
review remain blocked or retained.
|
|
18
|
+
|
|
19
|
+
`test-utility` persists the non-evidence `test-utility.json` analysis under
|
|
20
|
+
the task namespace. The canonical task mutation may also persist bounded
|
|
21
|
+
semantic-decision artifacts and task transaction or ledger state required to
|
|
22
|
+
make the analysis task-bound and reproducible. It does not delete tests, alter
|
|
23
|
+
completion evidence, or authorize external work.
|
|
24
|
+
|
|
25
|
+
`npm run benchmark:test-intelligence` exercises the real utility classifier on
|
|
26
|
+
a deterministic labeled fixture for redundancy, obsolescence, protected-test
|
|
27
|
+
false positives, and deletion safety. It reports precision and recall from the
|
|
28
|
+
classifier's observed output against the labeled fixture and never grants
|
|
29
|
+
deletion authority.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Test pruning safety
|
|
2
|
+
|
|
3
|
+
`test-prune-plan` can return `KEEP`, `PROBE_REMOVAL`, or `BLOCKED`.
|
|
4
|
+
`PROBE_REMOVAL` requires both protected-test policy and sufficient deterministic
|
|
5
|
+
and semantic evidence. Unknown utility is `BLOCKED`.
|
|
6
|
+
|
|
7
|
+
The safe candidate boundary is an unprotected, high-confidence
|
|
8
|
+
`REDUNDANT_CANDIDATE`. Protected tests and low-confidence or ambiguous
|
|
9
|
+
recommendations remain `KEEP`/`BLOCKED`. The isolated probe is
|
|
10
|
+
non-destructive: it records an observation without editing the live worktree
|
|
11
|
+
or authorizing deletion.
|
|
12
|
+
|
|
13
|
+
`test-prune-probe` is fail-closed and must use an isolated disposable workspace.
|
|
14
|
+
No command in this feature deletes or edits a test in the live working tree.
|
package/docs/TROUBLESHOOTING.md
CHANGED
|
@@ -12,6 +12,7 @@ This guide provides symptom-first recovery procedures for common ForgeLoop proto
|
|
|
12
12
|
- [`forgeloop next` returns `RECORD_DIAGNOSIS`](#symptom-forgeloop-next-returns-record_diagnosis)
|
|
13
13
|
- [Progress is `STALLED` or `forgeloop next` returns `CHANGE_STRATEGY`](#symptom-progress-is-stalled)
|
|
14
14
|
- [Protocol state or contract is `STALE`](#symptom-state-or-contract-is-stale)
|
|
15
|
+
- [A pre-execution checkpoint is stale because the repository moved](#symptom-a-pre-execution-checkpoint-is-stale-because-the-repository-moved)
|
|
15
16
|
- [Execution continuity is `STALE`](#symptom-continuity-is-stale)
|
|
16
17
|
- [Multiple tasks ambiguous (`E_TASK_AMBIGUOUS`)](#symptom-multiple-tasks-ambiguous)
|
|
17
18
|
- [Verification tool is missing (`E_VERIFICATION_TOOL_UNAVAILABLE`)](#symptom-verification-tool-is-missing)
|
|
@@ -329,6 +330,73 @@ the blocked preflight is resolved, `preflight` appends a fresh
|
|
|
329
330
|
details differ *without* an intervening BLOCKED outcome is still refused with
|
|
330
331
|
`E_PHASE_CHRONOLOGY_INVALID`.
|
|
331
332
|
|
|
333
|
+
### Symptom: A pre-execution checkpoint is stale because the repository moved
|
|
334
|
+
|
|
335
|
+
#### What it means
|
|
336
|
+
|
|
337
|
+
A `ROUTED` checkpoint has valid ownership, contract identity, route identity,
|
|
338
|
+
and no execution history, but its recorded repository branch or HEAD differs
|
|
339
|
+
from the current checkout. `next` returns `REVALIDATE_CHECKPOINT` with
|
|
340
|
+
`E_REPOSITORY_CHANGED` and `E_STATE_REVALIDATION_REQUIRED`.
|
|
341
|
+
|
|
342
|
+
#### Safe recovery
|
|
343
|
+
|
|
344
|
+
Run the canonical mutation:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
forgeloop checkpoint-revalidate --task <id> --json
|
|
348
|
+
forgeloop next --task <id> --explain --json
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
The command derives the repository fingerprint from ForgeLoop while holding
|
|
352
|
+
the task mutation boundary. It preserves the phase, contract fingerprint,
|
|
353
|
+
route fingerprint, selected guides, gates, checks, and evidence. It does not
|
|
354
|
+
revise the contract, reroute the task, fabricate continuity or receipt
|
|
355
|
+
artifacts, or operate after `EXECUTION_STARTED`.
|
|
356
|
+
|
|
357
|
+
If the command fails with `E_CHECKPOINT_REVALIDATION_UNSAFE`, follow the named
|
|
358
|
+
contract, route, artifact, ownership, or lifecycle boundary. Do not edit
|
|
359
|
+
`work-state.json`, pass a caller-supplied branch or HEAD, or use
|
|
360
|
+
`reconcile-closure` for a `ROUTED` task.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
### Symptom: The task contract must change before execution
|
|
365
|
+
|
|
366
|
+
#### What it means
|
|
367
|
+
|
|
368
|
+
The task is still before execution, but its objective, deliverables, or
|
|
369
|
+
constraints have changed. Existing route, preflight, gate, and plan evidence
|
|
370
|
+
must not authorize the new contract.
|
|
371
|
+
|
|
372
|
+
#### Safe recovery
|
|
373
|
+
|
|
374
|
+
Use exactly one bounded replacement source:
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
forgeloop contract-revise --task <id> --preset <documentation|bug|feature|release> --json
|
|
378
|
+
forgeloop contract-revise --task <id> --contract-file <path> --json
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
The command appends `CONTRACT_REVISED` followed immediately by
|
|
382
|
+
`TRANSACTION_COMMITTED(operation=contract-revise)`, resets derived evidence,
|
|
383
|
+
and preserves the task descriptor claims. A `ROUTED` task must be routed and
|
|
384
|
+
preflighted again; a `PLANNED` task is rewound to `ROUTED` and must receive a
|
|
385
|
+
fresh canonical route, preflight, and plan. Historical checkpoint identity
|
|
386
|
+
remains valid only when later contract and route evolution is proven by the
|
|
387
|
+
canonical append-only provenance chain.
|
|
388
|
+
|
|
389
|
+
`previousStateFingerprint` and `revisedStateFingerprint` on `CONTRACT_REVISED`
|
|
390
|
+
are transition-time audit bindings. They are checked when the revision is the
|
|
391
|
+
current state transition and participate in append-only event integrity; they
|
|
392
|
+
are not treated as permanently frozen current-state identity after later
|
|
393
|
+
canonical mutations.
|
|
394
|
+
|
|
395
|
+
Contract revision is unavailable after `EXECUTION_STARTED` and for active
|
|
396
|
+
contract-bootstrap repair or migration anchors. Do not rewrite the contract,
|
|
397
|
+
state, route, or ledger files manually. If `next` reports a stale route,
|
|
398
|
+
reroute it with the normal `route` command before running preflight.
|
|
399
|
+
|
|
332
400
|
---
|
|
333
401
|
|
|
334
402
|
### Symptom: `EXECUTING`/`VERIFYING` task is stale because the repository moved (`E_REPOSITORY_CHANGED`)
|
|
@@ -346,7 +414,7 @@ forgeloop reconcile-closure --task <id> --id <verification-id> \
|
|
|
346
414
|
|
|
347
415
|
`reconcile-closure` requires:
|
|
348
416
|
|
|
349
|
-
1. The task is `EXECUTING`, `VERIFYING`, or `REVIEWING`. A `REVIEWING` task
|
|
417
|
+
1. The task is `EXECUTING`, `VERIFYING`, or `REVIEWING`. A `REVIEWING` task may use authorized completion recovery (a persisted evidence-only rejection bound to the current checkpoint), or, when no completion rejection exists, the narrow bootstrap path for repository-only drift. The bootstrap path does not change phase, append completion events, or release claims.
|
|
350
418
|
2. The only drift is `REPOSITORY_CHANGED` (contract or required-artifact drift stays blocked).
|
|
351
419
|
3. The append-only event ledger is valid.
|
|
352
420
|
4. `--id` and `--requirement` exactly match a `VERIFICATION` item of the task contract, and the executed command exits 0, proving the objective is present in the current repository.
|
|
@@ -361,6 +429,12 @@ forgeloop advance --task <id> --to REVIEWING
|
|
|
361
429
|
forgeloop complete --task <id>
|
|
362
430
|
```
|
|
363
431
|
|
|
432
|
+
The bootstrap path is intentionally narrower than completion recovery: contract
|
|
433
|
+
identity, required artifacts, ledger validity, and active claim ownership must
|
|
434
|
+
already be valid, and the freshness classifier must report exactly
|
|
435
|
+
`REPOSITORY_CHANGED`. Contract or artifact drift remains blocked and must use
|
|
436
|
+
its dedicated canonical recovery surface.
|
|
437
|
+
|
|
364
438
|
#### Drifted completion-rejection snapshots (`E_COMPLETION_REJECTION_STATE_FINGERPRINT_MISMATCH`)
|
|
365
439
|
|
|
366
440
|
A `REVIEWING` task with a persisted evidence-only completion rejection can lose
|
|
@@ -487,6 +561,38 @@ corrupt, or unreadable evidence fails closed as `INCONSISTENT`. A `REVIEWING`
|
|
|
487
561
|
phase plus an old timestamp alone is never `STALE`; post-execution tasks whose
|
|
488
562
|
only drift is `REPOSITORY_CHANGED` remain `RECOVERABLE`.
|
|
489
563
|
|
|
564
|
+
#### Contract bootstrap repair
|
|
565
|
+
|
|
566
|
+
When `next` reports `REPAIR_CONTRACT_BOOTSTRAP`, do not edit `events.ndjson` or
|
|
567
|
+
`work-state.json`. Run the official, explicitly acknowledged repair:
|
|
568
|
+
|
|
569
|
+
```bash
|
|
570
|
+
forgeloop task-repair-contract-bootstrap --task <task-id> --acknowledge-repair --json
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
Only the exact duplicate `CONTRACT_VALIDATED` signature is accepted. The command
|
|
574
|
+
preserves historical lines, reconstructs the proven `CONTRACT_READY` or `ROUTED`
|
|
575
|
+
checkpoint, and records an append-only marker. Tampered artifacts, unrelated
|
|
576
|
+
chronology errors, live locks, or later meaningful activity fail closed.
|
|
577
|
+
If the ledger already contains `ROUTE_VALIDATED`, the route artifact is
|
|
578
|
+
required and must remain valid and contract-bound; ForgeLoop never downgrades
|
|
579
|
+
that history to `CONTRACT_READY`. After repair, a changed route identity is
|
|
580
|
+
accepted only when the route/state pair is canonical and a later
|
|
581
|
+
`TRANSACTION_COMMITTED` event has `operation: "route"`.
|
|
582
|
+
|
|
583
|
+
When `next` reports `MIGRATE_CONTRACT_BOOTSTRAP_REPAIR`, run the official
|
|
584
|
+
caller-acknowledged migration:
|
|
585
|
+
|
|
586
|
+
```bash
|
|
587
|
+
forgeloop task-migrate-contract-bootstrap-repair --task <task-id> --acknowledge-migration --json
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
This path is limited to the legacy marker schema that predates
|
|
591
|
+
`reconstructedStateRevision`. It proves the current state and route against the
|
|
592
|
+
recorded reconstruction, appends a bound migration witness, and preserves the
|
|
593
|
+
legacy marker byte-for-byte. It does not accept progressed ledgers, ambiguous
|
|
594
|
+
markers, or unknown/corrupt lock ownership.
|
|
595
|
+
|
|
490
596
|
#### Safe recovery
|
|
491
597
|
|
|
492
598
|
Follow the classification:
|
|
@@ -1232,6 +1338,25 @@ package/process recovery boundary. The relevant stable codes are
|
|
|
1232
1338
|
`E_PERSISTENT_TRANSPORT_HOST_STALE`, and
|
|
1233
1339
|
`E_PERSISTENT_TRANSPORT_PROTOCOL_MISMATCH`.
|
|
1234
1340
|
|
|
1341
|
+
### Symptom: Security Review provider is unavailable or rejected
|
|
1342
|
+
|
|
1343
|
+
#### Error Codes: `E_SECURITY_REVIEW_PROVIDER_INVALID`, `E_SECURITY_REVIEW_PROVIDER_UNAVAILABLE`, `E_SECURITY_REVIEW_REQUEST_INVALID`, `E_SECURITY_REVIEW_RESULT_INVALID`, `E_SECURITY_REVIEW_TIMEOUT`, `E_SECURITY_REVIEW_CANCELLED`, `E_SECURITY_REVIEW_OUTPUT_LIMIT`, `E_SECURITY_REVIEW_EXECUTION_FAILED`
|
|
1344
|
+
|
|
1345
|
+
#### What it means
|
|
1346
|
+
|
|
1347
|
+
The optional Security Review Integration API provider was not registered,
|
|
1348
|
+
failed the strict provider/request/result contract, exceeded its shared
|
|
1349
|
+
deadline or output budget, was cancelled, or threw during observation. This
|
|
1350
|
+
surface is advisory and never blocks or authorizes ForgeLoop lifecycle.
|
|
1351
|
+
|
|
1352
|
+
#### Safe recovery
|
|
1353
|
+
|
|
1354
|
+
Register an explicit host-owned provider with a matching portable ID, use
|
|
1355
|
+
bounded project-relative request paths and limits, and make the provider honor
|
|
1356
|
+
the supplied `AbortSignal`. Do not install or discover a scanner through
|
|
1357
|
+
ForgeLoop, and do not treat findings as evidence, completion, commands, or
|
|
1358
|
+
canonical task state.
|
|
1359
|
+
|
|
1235
1360
|
## Stable Error and Reason Codes
|
|
1236
1361
|
|
|
1237
1362
|
<!-- BEGIN FORGELOOP GENERATED: public-error-codes -->
|
|
@@ -1298,6 +1423,17 @@ package/process recovery boundary. The relevant stable codes are
|
|
|
1298
1423
|
| `E_AUTHORITY_UNTRUSTED_SOURCE` | Authority file placed inside untrusted project tree. | Place authority file in host-managed trusted location. |
|
|
1299
1424
|
| `E_BASELINE_EXPANSION` | Attempted unauthorized addition of new violations to brownfield baseline. | Resolve new violations rather than expanding the baseline. |
|
|
1300
1425
|
| `E_BASELINE_RECORD_DURING_ACTIVE_TASK` | Cannot re-record baseline during an active task with policy snapshot. | Resolve new violations or use monotonic baseline --update. |
|
|
1426
|
+
| `E_BROWSER_VERIFICATION_CANCELLED` | Browser verification was cancelled by its caller before a valid observation completed. | Retry only when the caller still requires the optional observation. |
|
|
1427
|
+
| `E_BROWSER_VERIFICATION_EXECUTION_FAILED` | The optional browser provider process failed without establishing a valid observation. | Inspect the host-provided browser executable and retry; process success is not verification success. |
|
|
1428
|
+
| `E_BROWSER_VERIFICATION_ORIGIN_DENIED` | Browser verification navigation left the request origin allowlist. | Add the intended origin to allowedOrigins or correct the provider navigation result. |
|
|
1429
|
+
| `E_BROWSER_VERIFICATION_OUTPUT_LIMIT` | Browser verification output exceeded the configured character or item limit. | Reduce steps, assertions, snapshots, diagnostics, or artifacts at the provider. |
|
|
1430
|
+
| `E_BROWSER_VERIFICATION_PROVIDER_INVALID` | Browser verification provider configuration or interface implementation is invalid. | Use a provider implementing id, verify(input) with the documented browser-verification contract; verification is optional. |
|
|
1431
|
+
| `E_BROWSER_VERIFICATION_PROVIDER_UNAVAILABLE` | Requested browser verification provider is not registered in runtime context. | Register the provider in runtime context before verify, or proceed without browser verification; provider failure never blocks canonical lifecycle. |
|
|
1432
|
+
| `E_BROWSER_VERIFICATION_REQUEST_INVALID` | Browser verification request failed validation or exceeded budget. | Provide a bounded request with 1-8 https origins, 1-64 steps, 1-64 assertions, and timeoutMs within limits. |
|
|
1433
|
+
| `E_BROWSER_VERIFICATION_RESULT_INVALID` | Browser verification provider returned an invalid result structure. | Ensure provider returns a status with bounded assertions, diagnostics, and artifacts, and no authority fields. |
|
|
1434
|
+
| `E_BROWSER_VERIFICATION_TIMEOUT` | Browser verification exceeded its execution timeout. | Use a responsive provider or increase timeout within limits; verification is optional. |
|
|
1435
|
+
| `E_BROWSER_VERIFICATION_VERSION_UNSUPPORTED` | The configured Agent Browser version does not satisfy the provider's exact version contract. | Provide the expected host-qualified Agent Browser version or update the explicit executable selection. |
|
|
1436
|
+
| `E_CHECKPOINT_REVALIDATION_UNSAFE` | A pre-execution checkpoint could not be safely rebound to the current repository without changing lifecycle identity. | Preserve the checkpoint and resolve the reported contract, route, ownership, artifact, or lifecycle boundary through its canonical command. |
|
|
1301
1437
|
| `E_CHECK_INERT` | An enabled check has no effective scope or target files. | Provide an applicable target scope, configure matching files, or mark the rule unsupported. |
|
|
1302
1438
|
| `E_CHECK_INVALID` | Check structure or required parameters are invalid. | Provide valid check ID, requirement, and parameters. |
|
|
1303
1439
|
| `E_CHECK_MUTATION_EXECUTION_ERROR` | A policy checker threw an unhandled exception while evaluating its mutation fixture. | Repair the checker execution path and rerun rule verification. |
|
|
@@ -1319,14 +1455,39 @@ package/process recovery boundary. The relevant stable codes are
|
|
|
1319
1455
|
| `E_CONTINUITY_SCHEMA_UNSUPPORTED` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1320
1456
|
| `E_CONTINUITY_STATE_MISSING` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1321
1457
|
| `E_CONTINUITY_TASK_MISMATCH` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1458
|
+
| `E_CONTRACT_BOOTSTRAP_INCONSISTENT` | Contract bootstrap evidence is inconsistent and cannot be treated as a normal idempotent checkpoint. | Inspect the task ledger and use the exact official contract bootstrap repair only when next recommends it. |
|
|
1459
|
+
| `E_CONTRACT_BOOTSTRAP_REPAIR_AUTHORIZATION_REQUIRED` | The official contract bootstrap repair requires explicit caller acknowledgement. | Re-run with --acknowledge-repair after reviewing next and the exact defect signature. |
|
|
1460
|
+
| `E_CONTRACT_BOOTSTRAP_REPAIR_AVAILABLE` | The exact recognized contract bootstrap defect has an official append-only repair path. | Run forgeloop task-repair-contract-bootstrap --task <id> --acknowledge-repair. |
|
|
1461
|
+
| `E_CONTRACT_BOOTSTRAP_REPAIR_INVALID` | The contract bootstrap repair marker or its bound artifacts are invalid or tampered. | Restore the original artifacts from trusted evidence; ForgeLoop refuses to guess or rewrite history. |
|
|
1462
|
+
| `E_CONTRACT_BOOTSTRAP_REPAIR_MIGRATION_AUTHORIZATION_REQUIRED` | The legacy contract bootstrap repair migration requires fresh explicit caller acknowledgement. | Re-run with --acknowledge-migration after reviewing next and the exact legacy marker boundary. |
|
|
1463
|
+
| `E_CONTRACT_BOOTSTRAP_REPAIR_MIGRATION_AVAILABLE` | The exact legacy contract bootstrap repair marker has an official append-only migration path. | Run forgeloop task-migrate-contract-bootstrap-repair --task <id> --acknowledge-migration. |
|
|
1464
|
+
| `E_CONTRACT_BOOTSTRAP_REPAIR_MIGRATION_INVALID` | Legacy contract bootstrap repair migration was refused because its exact marker, state, route, lock, or ledger boundary could not be proven. | Inspect the structured migration errors; ambiguous or progressed historical ledgers remain inconsistent and are never rewritten. |
|
|
1465
|
+
| `E_CONTRACT_BOOTSTRAP_REPAIR_UNSAFE` | The historical contract bootstrap defect does not satisfy the narrow repair safety boundary. | Do not force repair; resolve the ledger inconsistency through a separately reviewed migration. |
|
|
1322
1466
|
| `E_CONTRACT_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1323
1467
|
| `E_CONTRACT_MISSING` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1324
1468
|
| `E_CONTRACT_STALE` | Contract modified after downstream artifacts were generated. | Re-run forgeloop route and forgeloop preflight. |
|
|
1325
1469
|
| `E_CONTRACT_UNRESOLVED_DECISION` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1326
1470
|
| `E_CONTRIBUTOR_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1327
1471
|
| `E_CONTRIBUTOR_REFERENCE_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1472
|
+
| `E_DECISION_CACHE_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1328
1473
|
| `E_DECISION_CRITERION_INVALID` | Decision settlement criterion details or parameters are malformed. | Provide non-empty decision text and settledBy criterion. |
|
|
1474
|
+
| `E_DECISION_ENGINE_AUTH_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1475
|
+
| `E_DECISION_ENGINE_AUTH_REQUIRED` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1476
|
+
| `E_DECISION_ENGINE_UNAVAILABLE` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1477
|
+
| `E_DECISION_LOW_CONFIDENCE` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1478
|
+
| `E_DECISION_MODEL_UNSUPPORTED` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1329
1479
|
| `E_DECISION_NOT_UNRESOLVED` | A settlement criterion referenced a decision not present in current unresolvedDecisions. | Use the exact current unresolved decision text or update the contract first. |
|
|
1480
|
+
| `E_DECISION_POLICY_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1481
|
+
| `E_DECISION_QUESTION_SET_STALE` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1482
|
+
| `E_DECISION_QUESTION_SET_UNKNOWN` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1483
|
+
| `E_DECISION_RATE_LIMITED` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1484
|
+
| `E_DECISION_REQUEST_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1485
|
+
| `E_DECISION_REQUIRED` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1486
|
+
| `E_DECISION_RESULT_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1487
|
+
| `E_DECISION_STALE` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1488
|
+
| `E_DECISION_STATE_LIMIT` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1489
|
+
| `E_DECISION_STATE_UNSAFE` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1490
|
+
| `E_DECISION_TIMEOUT` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1330
1491
|
| `E_DIAGNOSIS_CYCLE_MISMATCH` | Diagnosis verification cycle does not match the active work state verification cycle. | Record diagnosis for the current active verification cycle. |
|
|
1331
1492
|
| `E_DIAGNOSIS_EVIDENCE_INVALID` | Referenced diagnosis evidence is missing or has no failed checks in the current cycle. | Reference at least one failed or blocked check ID from the active verification cycle. |
|
|
1332
1493
|
| `E_DIAGNOSIS_INVALID` | Diagnosis record details or parameters are malformed. | Provide valid failureClass, hypothesis, evidenceRefs, settledBy, and nextSafeAction. |
|
|
@@ -1350,6 +1511,8 @@ package/process recovery boundary. The relevant stable codes are
|
|
|
1350
1511
|
| `E_FAILURE_SIGNATURE_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1351
1512
|
| `E_FUTURE_LIFECYCLE_EVIDENCE` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1352
1513
|
| `E_FUTURE_TERMINAL_EVIDENCE` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1514
|
+
| `E_GATE_INVALID` | Gate input or evidence artifact is invalid or unsafe. | Use project-relative regular artifact paths and valid gate evidence. |
|
|
1515
|
+
| `E_GATE_NOT_REQUIRED` | Requested gate is not required by the active route or policy. | Inspect the active route and record only a required gate. |
|
|
1353
1516
|
| `E_GATE_REQUIRED` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1354
1517
|
| `E_GATE_STALE` | Referenced gate artifact changed after approval. | Update artifact SHA-256 in gate file. |
|
|
1355
1518
|
| `E_GATE_UNVERIFIED` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
@@ -1389,6 +1552,7 @@ package/process recovery boundary. The relevant stable codes are
|
|
|
1389
1552
|
| `E_PERSISTENT_TRANSPORT_TIMEOUT` | A persistent-search connection, handshake, or request exceeded its bounded timeout. | Retry once through the ownership-checked recovery path and inspect host/index health if it persists. |
|
|
1390
1553
|
| `E_PERSISTENT_TRANSPORT_UNAVAILABLE` | The user-scoped persistent-search endpoint was not reachable. | ForgeLoop starts one verified local host and retries once; persistent failure is reported without an rg fallback. |
|
|
1391
1554
|
| `E_PHASE_CHRONOLOGY_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1555
|
+
| `E_PHASE_FREEZE` | The requested gate mutation is forbidden after execution begins. | Record required gates before entering EXECUTING. |
|
|
1392
1556
|
| `E_PHASE_PREREQUISITE_MISSING` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1393
1557
|
| `E_PHASE_TRANSITION_INVALID` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1394
1558
|
| `E_POLICY_DRIFT` | Active policy lock does not match the policy snapshot captured at task activation. | Re-verify affected checks or restore original policy. |
|
|
@@ -1467,6 +1631,14 @@ package/process recovery boundary. The relevant stable codes are
|
|
|
1467
1631
|
| `E_ROUTE_MISSING` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1468
1632
|
| `E_ROUTE_REASON_MISSING` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1469
1633
|
| `E_ROUTE_STALE` | Routing result does not match the active contract fingerprint. | Re-run forgeloop route. |
|
|
1634
|
+
| `E_SECURITY_REVIEW_CANCELLED` | Security review provider execution was cancelled before a valid observation completed. | Retry only when the caller still requires the optional observation. |
|
|
1635
|
+
| `E_SECURITY_REVIEW_EXECUTION_FAILED` | The optional security review provider failed without producing a valid observation. | Inspect the host-provided provider and retry explicitly; provider failure never changes ForgeLoop state. |
|
|
1636
|
+
| `E_SECURITY_REVIEW_OUTPUT_LIMIT` | Security review provider output exceeded the bounded result limits. | Reduce findings, diagnostics, strings, or result size at the provider. |
|
|
1637
|
+
| `E_SECURITY_REVIEW_PROVIDER_INVALID` | Security review provider configuration or interface implementation is invalid. | Use a provider implementing id and review(input) through the explicit host-injected Integration API. |
|
|
1638
|
+
| `E_SECURITY_REVIEW_PROVIDER_UNAVAILABLE` | The requested security review provider is not registered in runtime context. | Register an optional host-owned provider before explicit invocation; ForgeLoop never installs one. |
|
|
1639
|
+
| `E_SECURITY_REVIEW_REQUEST_INVALID` | The bounded security review request failed validation. | Provide explicit scope, bounded project-relative paths, categories, requirements, identities, and timeout. |
|
|
1640
|
+
| `E_SECURITY_REVIEW_RESULT_INVALID` | The security review provider returned malformed or contradictory findings. | Return only bounded findings and diagnostics without authority, lifecycle, evidence, or executable fields. |
|
|
1641
|
+
| `E_SECURITY_REVIEW_TIMEOUT` | Security review provider execution exceeded the shared deadline. | Use a responsive provider or a bounded timeout within the supported limit; timed-out output is discarded. |
|
|
1470
1642
|
| `E_STATE_LEDGER_DIVERGENCE` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1471
1643
|
| `E_STATE_MISSING` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1472
1644
|
| `E_STATE_MISSING_AFTER_PREFLIGHT_READY` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
@@ -1494,6 +1666,11 @@ package/process recovery boundary. The relevant stable codes are
|
|
|
1494
1666
|
| `E_STRUCTURAL_QUALITY_SOURCE_DRIFT` | Structural-quality evidence did not satisfy its provider, artifact, comparison, or lifecycle boundary. | Ensure the worktree is not mutated during provider observation and rerun quality-baseline or quality-verify. |
|
|
1495
1667
|
| `E_STRUCTURAL_QUALITY_SOURCE_FINGERPRINT_UNAVAILABLE` | Structural-quality evidence did not satisfy its provider, artifact, comparison, or lifecycle boundary. | Repair unreadable or unsafe source material before structural-quality evidence can be trusted. |
|
|
1496
1668
|
| `E_STRUCTURAL_QUALITY_TIMEOUT` | Structural-quality evidence did not satisfy its provider, artifact, comparison, or lifecycle boundary. | Use a responsive provider or a bounded timeout within the supported limit; never promote a timed-out scan. |
|
|
1669
|
+
| `E_TASK_ABANDON_AUTHORIZATION_REQUIRED` | task-abandon requires explicit caller acknowledgement and never grants completion or publication authority. | Re-run task-abandon with --acknowledge-abandonment after confirming the explicit task identity and intended claim release. |
|
|
1670
|
+
| `E_TASK_ABANDON_INCONSISTENT` | Explicit abandonment was refused because canonical ownership or append-only ledger evidence is inconsistent. | Repair and validate the task descriptor, recovery artifact, and ledger through their dedicated protocol paths before retrying. |
|
|
1671
|
+
| `E_TASK_ABANDON_INVALID_STATE` | The selected task is terminal or otherwise not eligible for explicit active-task abandonment. | Inspect task-show and next; only a valid non-terminal active task may be explicitly abandoned. |
|
|
1672
|
+
| `E_TASK_ABANDON_UNSAFE` | Task identity, lifecycle revision, ledger boundary, or claim ownership changed during explicit abandonment. | Re-inspect the task and retry only after the competing mutation has settled; never force claim release. |
|
|
1673
|
+
| `E_TASK_ALREADY_ABANDONED` | The task already has an active explicit-abandonment recovery boundary. | Inspect the existing recovery state; use task-resume only when explicit reacquisition is intended. |
|
|
1497
1674
|
| `E_TASK_ALREADY_EXISTS` | A ForgeLoop protocol validation or lifecycle condition was not satisfied. | Inspect the structured command result, correct the named artifact or prerequisite, then run forgeloop next --json. |
|
|
1498
1675
|
| `E_TASK_ALREADY_RECOVERED` | The task already has active durable recovered state. | Inspect the existing recovery metadata; use task-resume to reacquire claims or leave the task recovered. |
|
|
1499
1676
|
| `E_TASK_AMBIGUOUS` | Multiple tasks exist in the project but no task selector was provided. | Select a task explicitly using --task <id> or FORGELOOP_TASK=<id>. |
|
|
@@ -1556,3 +1733,23 @@ that order, satisfy any remaining gates, and require `READY` again.
|
|
|
1556
1733
|
This recovery guidance is unavailable after execution has started, for an
|
|
1557
1734
|
invalid ledger, or when the new route does not match the contract. Preserve
|
|
1558
1735
|
those barriers and follow the task's canonical recovery guidance.
|
|
1736
|
+
|
|
1737
|
+
## Gate Recording
|
|
1738
|
+
|
|
1739
|
+
When `preflight` reports `E_GATE_UNVERIFIED`, use the executable command returned
|
|
1740
|
+
by `next` or record the required gate directly:
|
|
1741
|
+
|
|
1742
|
+
```bash
|
|
1743
|
+
node src/cli.js gate-record \
|
|
1744
|
+
--task <task-id> \
|
|
1745
|
+
--gate threat-boundary \
|
|
1746
|
+
--status satisfied \
|
|
1747
|
+
--artifact THREAT_MODEL.md \
|
|
1748
|
+
--decision "Threat boundary reviewed for this task" \
|
|
1749
|
+
--json
|
|
1750
|
+
```
|
|
1751
|
+
|
|
1752
|
+
ForgeLoop validates that the gate is required by the active route or policy,
|
|
1753
|
+
rejects traversal and symlink escapes, and computes artifact hashes itself.
|
|
1754
|
+
Changed referenced files produce `E_GATE_STALE`; manual gate JSON editing is not
|
|
1755
|
+
supported. Caller-recorded decisions are observations, not host attestation.
|
|
@@ -67,6 +67,31 @@ may be absent only when the canonical protocol marks it not applicable;
|
|
|
67
67
|
presentation depth cannot change evidence, verification truth, authority,
|
|
68
68
|
provenance, safety-floor, or validator-backed completion requirements.
|
|
69
69
|
|
|
70
|
+
### Audit UX read model
|
|
71
|
+
|
|
72
|
+
The read-only `task/audit-view` resource provides a bounded operator-facing
|
|
73
|
+
projection of canonical status, audit, report, history, trace, ownership, next
|
|
74
|
+
action, approvals, diagnostics, recovery, and completion data. It is suitable
|
|
75
|
+
for timelines and audit panels, but it is not a lifecycle or evidence
|
|
76
|
+
authority:
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
const view = await readForgeLoopIntegrationResource("task/audit-view", {
|
|
80
|
+
taskId: "task-1",
|
|
81
|
+
limit: 50,
|
|
82
|
+
categories: ["LIFECYCLE", "CHECK", "DIAGNOSTIC"],
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Timeline items use deterministic sequence-backed IDs and explicit `null`
|
|
87
|
+
timestamps when the ledger lacks an authoritative timestamp. `limit`,
|
|
88
|
+
`beforeSequence`, `afterSequence`, and category filters are bounded. Raw event
|
|
89
|
+
payloads, commands, environment values, credentials, absolute paths, and
|
|
90
|
+
provider output are not exposed. Reading the resource performs no command,
|
|
91
|
+
provider, artifact, claim, or lifecycle mutation. Use the canonical CLI/API
|
|
92
|
+
commands for every state-changing operation. See [`AUDIT_UX.md`](./AUDIT_UX.md)
|
|
93
|
+
for the complete projection contract.
|
|
94
|
+
|
|
70
95
|
### Repository Search boundary
|
|
71
96
|
|
|
72
97
|
The Integration API exposes direct, transport-neutral repository operations:
|
|
@@ -183,6 +208,12 @@ there is no stock `context-recall` command. A consumer that only understands
|
|
|
183
208
|
`canonicalHandoffs` v1 may disable only the handoff-specific UI while retaining
|
|
184
209
|
the rest of Protocol v1 functionality.
|
|
185
210
|
|
|
211
|
+
`advisoryContextProviders` v1 is the existing dedicated, lazy, opt-in
|
|
212
|
+
Integration API capability. `providerExtensions` v1 is the broader experimental
|
|
213
|
+
architecture vocabulary advertised by `protocol-info`. Generic provider
|
|
214
|
+
registry injection is not public yet; do not add a generic `providers` field
|
|
215
|
+
to `createForgeLoopContext()`.
|
|
216
|
+
|
|
186
217
|
## Consumers
|
|
187
218
|
|
|
188
219
|
| Surface | Entry |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en" data-theme="dark" data-preset="signal-flow" data-present="true">
|
|
3
3
|
<head>
|
|
4
|
-
<meta name="forgeloop-diagram-source-sha256" content="
|
|
4
|
+
<meta name="forgeloop-diagram-source-sha256" content="eb8ca8fdfceb9e50cf7cd07be8622dcac127cfee80c8e2929d604c40138cc594">
|
|
5
5
|
<meta name="forgeloop-diagram-renderer" content="archify@2.15.0 (e1ac748f19cf805e44bf74fb93c796662152e273)">
|
|
6
6
|
<meta charset="UTF-8">
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
@@ -5432,7 +5432,7 @@
|
|
|
5432
5432
|
<h3>Trust Levels</h3>
|
|
5433
5433
|
</div>
|
|
5434
5434
|
<ul>
|
|
5435
|
-
<li>• PROCESSED
|
|
5435
|
+
<li>• PROCESSED is a minimum reported level; MISSING, DISABLED, and INVALID remain separate statuses</li>
|
|
5436
5436
|
<li>• VERIFIED means completion, evidence, manifest, and content bindings validate</li>
|
|
5437
5437
|
<li>• ATTESTED additionally requires a valid external signature policy</li>
|
|
5438
5438
|
<li>• No supplied CI receipt means NOT_VERIFIED, not a trust level</li>
|