@warpgogol/forge 9.4.1 → 9.6.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/CHANGELOG.md +33 -0
- package/README.md +30 -0
- package/README.uk.md +30 -0
- package/bin/cli.ts +163 -53
- package/dist/bin/cli.js +137 -42
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/codebase/codebase.module.d.ts +3 -0
- package/dist/os/codebase/codebase.module.d.ts.map +1 -0
- package/dist/os/codebase/codebase.module.js +53 -0
- package/dist/os/codebase/codebase.module.js.map +1 -0
- package/dist/os/codebase/handlers/codebase-measure-symbols.d.ts +15 -0
- package/dist/os/codebase/handlers/codebase-measure-symbols.d.ts.map +1 -0
- package/dist/os/codebase/handlers/codebase-measure-symbols.js +97 -0
- package/dist/os/codebase/handlers/codebase-measure-symbols.js.map +1 -0
- package/dist/os/codebase/handlers/codebase-measure.d.ts +22 -0
- package/dist/os/codebase/handlers/codebase-measure.d.ts.map +1 -0
- package/dist/os/codebase/handlers/codebase-measure.js +435 -0
- package/dist/os/codebase/handlers/codebase-measure.js.map +1 -0
- package/dist/os/codebase/index.d.ts +4 -0
- package/dist/os/codebase/index.d.ts.map +1 -0
- package/dist/os/codebase/index.js +13 -0
- package/dist/os/codebase/index.js.map +1 -0
- package/dist/os/codebase/types.d.ts +35 -0
- package/dist/os/codebase/types.d.ts.map +1 -0
- package/dist/os/codebase/types.js +17 -0
- package/dist/os/codebase/types.js.map +1 -0
- package/dist/os/core/handlers/package-health.d.ts +6 -4
- package/dist/os/core/handlers/package-health.d.ts.map +1 -1
- package/dist/os/core/handlers/package-health.js +15 -20
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/correctness/anchors.d.ts +24 -0
- package/dist/os/correctness/anchors.d.ts.map +1 -0
- package/dist/os/correctness/anchors.js +156 -0
- package/dist/os/correctness/anchors.js.map +1 -0
- package/dist/os/correctness/audit/bindings-verify-substance.d.ts +7 -0
- package/dist/os/correctness/audit/bindings-verify-substance.d.ts.map +1 -0
- package/dist/os/correctness/audit/bindings-verify-substance.js +145 -0
- package/dist/os/correctness/audit/bindings-verify-substance.js.map +1 -0
- package/dist/os/correctness/audit/differential.d.ts +7 -0
- package/dist/os/correctness/audit/differential.d.ts.map +1 -0
- package/dist/os/correctness/audit/differential.js +105 -0
- package/dist/os/correctness/audit/differential.js.map +1 -0
- package/dist/os/correctness/audit/ledger-orphans.d.ts +6 -0
- package/dist/os/correctness/audit/ledger-orphans.d.ts.map +1 -0
- package/dist/os/correctness/audit/ledger-orphans.js +71 -0
- package/dist/os/correctness/audit/ledger-orphans.js.map +1 -0
- package/dist/os/correctness/audit/ledger.d.ts +29 -0
- package/dist/os/correctness/audit/ledger.d.ts.map +1 -0
- package/dist/os/correctness/audit/ledger.js +72 -0
- package/dist/os/correctness/audit/ledger.js.map +1 -0
- package/dist/os/correctness/audit/run.d.ts +27 -0
- package/dist/os/correctness/audit/run.d.ts.map +1 -0
- package/dist/os/correctness/audit/run.js +184 -0
- package/dist/os/correctness/audit/run.js.map +1 -0
- package/dist/os/correctness/audit/schema-db.d.ts +32 -0
- package/dist/os/correctness/audit/schema-db.d.ts.map +1 -0
- package/dist/os/correctness/audit/schema-db.js +166 -0
- package/dist/os/correctness/audit/schema-db.js.map +1 -0
- package/dist/os/correctness/audit/snapshot.d.ts +34 -0
- package/dist/os/correctness/audit/snapshot.d.ts.map +1 -0
- package/dist/os/correctness/audit/snapshot.js +190 -0
- package/dist/os/correctness/audit/snapshot.js.map +1 -0
- package/dist/os/correctness/audit/sql-scanner.d.ts +28 -0
- package/dist/os/correctness/audit/sql-scanner.d.ts.map +1 -0
- package/dist/os/correctness/audit/sql-scanner.js +279 -0
- package/dist/os/correctness/audit/sql-scanner.js.map +1 -0
- package/dist/os/correctness/audit/sql-schema-conform.d.ts +17 -0
- package/dist/os/correctness/audit/sql-schema-conform.d.ts.map +1 -0
- package/dist/os/correctness/audit/sql-schema-conform.js +163 -0
- package/dist/os/correctness/audit/sql-schema-conform.js.map +1 -0
- package/dist/os/correctness/audit/state-transitions-coverage.d.ts +19 -0
- package/dist/os/correctness/audit/state-transitions-coverage.d.ts.map +1 -0
- package/dist/os/correctness/audit/state-transitions-coverage.js +263 -0
- package/dist/os/correctness/audit/state-transitions-coverage.js.map +1 -0
- package/dist/os/correctness/audit/tests/git-fixture.d.ts +15 -0
- package/dist/os/correctness/audit/tests/git-fixture.d.ts.map +1 -0
- package/dist/os/correctness/audit/tests/git-fixture.js +85 -0
- package/dist/os/correctness/audit/tests/git-fixture.js.map +1 -0
- package/dist/os/correctness/audit/types.d.ts +58 -0
- package/dist/os/correctness/audit/types.d.ts.map +1 -0
- package/dist/os/correctness/audit/types.js +34 -0
- package/dist/os/correctness/audit/types.js.map +1 -0
- package/dist/os/correctness/correctness.module.d.ts +3 -0
- package/dist/os/correctness/correctness.module.d.ts.map +1 -0
- package/dist/os/correctness/correctness.module.js +173 -0
- package/dist/os/correctness/correctness.module.js.map +1 -0
- package/dist/os/correctness/gate/frozen.d.ts +52 -0
- package/dist/os/correctness/gate/frozen.d.ts.map +1 -0
- package/dist/os/correctness/gate/frozen.js +322 -0
- package/dist/os/correctness/gate/frozen.js.map +1 -0
- package/dist/os/correctness/gate/origin.d.ts +28 -0
- package/dist/os/correctness/gate/origin.d.ts.map +1 -0
- package/dist/os/correctness/gate/origin.js +139 -0
- package/dist/os/correctness/gate/origin.js.map +1 -0
- package/dist/os/correctness/gate/repo.d.ts +25 -0
- package/dist/os/correctness/gate/repo.d.ts.map +1 -0
- package/dist/os/correctness/gate/repo.js +88 -0
- package/dist/os/correctness/gate/repo.js.map +1 -0
- package/dist/os/correctness/gate/run.d.ts +22 -0
- package/dist/os/correctness/gate/run.d.ts.map +1 -0
- package/dist/os/correctness/gate/run.js +430 -0
- package/dist/os/correctness/gate/run.js.map +1 -0
- package/dist/os/correctness/gate/runner.d.ts +18 -0
- package/dist/os/correctness/gate/runner.d.ts.map +1 -0
- package/dist/os/correctness/gate/runner.js +123 -0
- package/dist/os/correctness/gate/runner.js.map +1 -0
- package/dist/os/correctness/gate/tests/gate-fixture.d.ts +36 -0
- package/dist/os/correctness/gate/tests/gate-fixture.d.ts.map +1 -0
- package/dist/os/correctness/gate/tests/gate-fixture.js +153 -0
- package/dist/os/correctness/gate/tests/gate-fixture.js.map +1 -0
- package/dist/os/correctness/gate/types.d.ts +102 -0
- package/dist/os/correctness/gate/types.d.ts.map +1 -0
- package/dist/os/correctness/gate/types.js +64 -0
- package/dist/os/correctness/gate/types.js.map +1 -0
- package/dist/os/correctness/handlers/audit.d.ts +4 -0
- package/dist/os/correctness/handlers/audit.d.ts.map +1 -0
- package/dist/os/correctness/handlers/audit.js +95 -0
- package/dist/os/correctness/handlers/audit.js.map +1 -0
- package/dist/os/correctness/handlers/gate.d.ts +4 -0
- package/dist/os/correctness/handlers/gate.d.ts.map +1 -0
- package/dist/os/correctness/handlers/gate.js +62 -0
- package/dist/os/correctness/handlers/gate.js.map +1 -0
- package/dist/os/correctness/handlers/validate.d.ts +19 -0
- package/dist/os/correctness/handlers/validate.d.ts.map +1 -0
- package/dist/os/correctness/handlers/validate.js +367 -0
- package/dist/os/correctness/handlers/validate.js.map +1 -0
- package/dist/os/correctness/index.d.ts +8 -0
- package/dist/os/correctness/index.d.ts.map +1 -0
- package/dist/os/correctness/index.js +23 -0
- package/dist/os/correctness/index.js.map +1 -0
- package/dist/os/correctness/manifest-schema.d.ts +155 -0
- package/dist/os/correctness/manifest-schema.d.ts.map +1 -0
- package/dist/os/correctness/manifest-schema.js +110 -0
- package/dist/os/correctness/manifest-schema.js.map +1 -0
- package/dist/os/correctness/references.d.ts +22 -0
- package/dist/os/correctness/references.d.ts.map +1 -0
- package/dist/os/correctness/references.js +129 -0
- package/dist/os/correctness/references.js.map +1 -0
- package/dist/os/correctness/tests/fixture-workspace.d.ts +23 -0
- package/dist/os/correctness/tests/fixture-workspace.d.ts.map +1 -0
- package/dist/os/correctness/tests/fixture-workspace.js +104 -0
- package/dist/os/correctness/tests/fixture-workspace.js.map +1 -0
- package/dist/os/correctness/workspace.d.ts +32 -0
- package/dist/os/correctness/workspace.d.ts.map +1 -0
- package/dist/os/correctness/workspace.js +147 -0
- package/dist/os/correctness/workspace.js.map +1 -0
- package/dist/os/flow/correctness-step.d.ts +19 -0
- package/dist/os/flow/correctness-step.d.ts.map +1 -0
- package/dist/os/flow/correctness-step.js +133 -0
- package/dist/os/flow/correctness-step.js.map +1 -0
- package/dist/os/flow/digest.d.ts +18 -0
- package/dist/os/flow/digest.d.ts.map +1 -1
- package/dist/os/flow/digest.js +28 -1
- package/dist/os/flow/digest.js.map +1 -1
- package/dist/os/flow/dirty-classify.d.ts +7 -0
- package/dist/os/flow/dirty-classify.d.ts.map +1 -1
- package/dist/os/flow/dirty-classify.js +11 -0
- package/dist/os/flow/dirty-classify.js.map +1 -1
- package/dist/os/flow/flow.module.d.ts.map +1 -1
- package/dist/os/flow/flow.module.js +19 -4
- package/dist/os/flow/flow.module.js.map +1 -1
- package/dist/os/flow/handlers/flow-check.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-check.js +9 -9
- package/dist/os/flow/handlers/flow-check.js.map +1 -1
- package/dist/os/flow/handlers/flow-digest.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-digest.js +11 -1
- package/dist/os/flow/handlers/flow-digest.js.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.d.ts +11 -0
- package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.js +148 -30
- package/dist/os/flow/handlers/flow-integrate.js.map +1 -1
- package/dist/os/flow/handlers/flow-open.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-open.js +14 -19
- package/dist/os/flow/handlers/flow-open.js.map +1 -1
- package/dist/os/flow/index.d.ts +1 -0
- package/dist/os/flow/index.d.ts.map +1 -1
- package/dist/os/flow/index.js +5 -3
- package/dist/os/flow/index.js.map +1 -1
- package/dist/os/flow/post-rebase-regen.d.ts +33 -0
- package/dist/os/flow/post-rebase-regen.d.ts.map +1 -0
- package/dist/os/flow/post-rebase-regen.js +120 -0
- package/dist/os/flow/post-rebase-regen.js.map +1 -0
- package/dist/os/flow/preflight.d.ts +24 -0
- package/dist/os/flow/preflight.d.ts.map +1 -1
- package/dist/os/flow/preflight.js +364 -24
- package/dist/os/flow/preflight.js.map +1 -1
- package/dist/os/flow/publish.d.ts.map +1 -1
- package/dist/os/flow/publish.js +23 -4
- package/dist/os/flow/publish.js.map +1 -1
- package/dist/os/flow/registry.d.ts +6 -6
- package/dist/os/flow/tests/helpers.d.ts +9 -1
- package/dist/os/flow/tests/helpers.d.ts.map +1 -1
- package/dist/os/flow/tests/helpers.js +36 -2
- package/dist/os/flow/tests/helpers.js.map +1 -1
- package/dist/os/friction/types.d.ts +2 -2
- package/dist/os/gate-run/detach.d.ts +27 -0
- package/dist/os/gate-run/detach.d.ts.map +1 -0
- package/dist/os/gate-run/detach.js +85 -0
- package/dist/os/gate-run/detach.js.map +1 -0
- package/dist/os/gate-run/gate-run.module.d.ts +3 -0
- package/dist/os/gate-run/gate-run.module.d.ts.map +1 -0
- package/dist/os/gate-run/gate-run.module.js +23 -0
- package/dist/os/gate-run/gate-run.module.js.map +1 -0
- package/dist/os/gate-run/index.d.ts +7 -0
- package/dist/os/gate-run/index.d.ts.map +1 -0
- package/dist/os/gate-run/index.js +5 -0
- package/dist/os/gate-run/index.js.map +1 -0
- package/dist/os/gate-run/record.d.ts +47 -0
- package/dist/os/gate-run/record.d.ts.map +1 -0
- package/dist/os/gate-run/record.js +157 -0
- package/dist/os/gate-run/record.js.map +1 -0
- package/dist/os/gate-run/status.d.ts +53 -0
- package/dist/os/gate-run/status.d.ts.map +1 -0
- package/dist/os/gate-run/status.js +163 -0
- package/dist/os/gate-run/status.js.map +1 -0
- package/dist/os/gate-run/types.d.ts +47 -0
- package/dist/os/gate-run/types.d.ts.map +1 -0
- package/dist/os/gate-run/types.js +24 -0
- package/dist/os/gate-run/types.js.map +1 -0
- package/dist/os/program/schemas.d.ts +3 -3
- package/dist/os/queue/types.d.ts +2 -2
- package/dist/os/rfc/evidence-annotation.d.ts +26 -0
- package/dist/os/rfc/evidence-annotation.d.ts.map +1 -0
- package/dist/os/rfc/evidence-annotation.js +52 -0
- package/dist/os/rfc/evidence-annotation.js.map +1 -0
- package/dist/os/rfc/handlers/fixed-inputs.d.ts.map +1 -1
- package/dist/os/rfc/handlers/fixed-inputs.js +7 -1
- package/dist/os/rfc/handlers/fixed-inputs.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-promotes.d.ts +8 -0
- package/dist/os/rfc/handlers/implement-stamp-promotes.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-promotes.js +65 -0
- package/dist/os/rfc/handlers/implement-stamp-promotes.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +35 -29
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +152 -11
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +20 -7
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +12 -3
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +5 -2
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verify-workspace.d.ts +12 -0
- package/dist/os/rfc/verify-workspace.d.ts.map +1 -1
- package/dist/os/rfc/verify-workspace.js +155 -0
- package/dist/os/rfc/verify-workspace.js.map +1 -1
- package/dist/os/system/task-schemas.d.ts +1 -1
- package/dist/os/system/tests/helpers.d.ts.map +1 -1
- package/dist/os/system/tests/helpers.js +6 -1
- package/dist/os/system/tests/helpers.js.map +1 -1
- package/dist/os/werkstatt/handlers/schema.d.ts +1 -1
- package/dist/src/cli-flags.d.ts.map +1 -1
- package/dist/src/cli-flags.js +6 -0
- package/dist/src/cli-flags.js.map +1 -1
- package/dist/src/command-modules.d.ts +4 -0
- package/dist/src/command-modules.d.ts.map +1 -0
- package/dist/src/command-modules.js +42 -0
- package/dist/src/command-modules.js.map +1 -0
- package/dist/src/config/forge-config.d.ts +16 -1
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +27 -11
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/correctness/index.d.ts +32 -0
- package/dist/src/correctness/index.d.ts.map +1 -0
- package/dist/src/correctness/index.js +157 -0
- package/dist/src/correctness/index.js.map +1 -0
- package/dist/src/correctness/schema-hash.d.ts +15 -0
- package/dist/src/correctness/schema-hash.d.ts.map +1 -0
- package/dist/src/correctness/schema-hash.js +44 -0
- package/dist/src/correctness/schema-hash.js.map +1 -0
- package/dist/src/knowledge/schema.d.ts +1 -1
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +20 -3
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/create.d.ts +7 -0
- package/dist/src/onboarding/create.d.ts.map +1 -1
- package/dist/src/onboarding/create.js +62 -9
- package/dist/src/onboarding/create.js.map +1 -1
- package/dist/src/types.d.ts +7 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +2 -8
- package/dist/src/types.js.map +1 -1
- package/docs/reference/correctness-audit.md +91 -0
- package/docs/reference/correctness-gate.md +102 -0
- package/docs/reference/correctness-manifest.md +142 -0
- package/docs/reference/forge-yaml.md +15 -0
- package/os/codebase/codebase.module.ts +57 -0
- package/os/codebase/handlers/codebase-measure-symbols.ts +131 -0
- package/os/codebase/handlers/codebase-measure.ts +503 -0
- package/os/codebase/index.ts +21 -0
- package/os/codebase/types.ts +55 -0
- package/os/core/handlers/package-health.test.ts +24 -2
- package/os/core/handlers/package-health.ts +16 -19
- package/os/correctness/anchors.ts +182 -0
- package/os/correctness/audit/bindings-verify-substance.test.ts +79 -0
- package/os/correctness/audit/bindings-verify-substance.ts +155 -0
- package/os/correctness/audit/differential.test.ts +113 -0
- package/os/correctness/audit/differential.ts +131 -0
- package/os/correctness/audit/ledger-orphans.test.ts +96 -0
- package/os/correctness/audit/ledger-orphans.ts +84 -0
- package/os/correctness/audit/ledger.test.ts +65 -0
- package/os/correctness/audit/ledger.ts +103 -0
- package/os/correctness/audit/run.ts +220 -0
- package/os/correctness/audit/schema-db.ts +208 -0
- package/os/correctness/audit/snapshot.ts +211 -0
- package/os/correctness/audit/sql-scanner.test.ts +84 -0
- package/os/correctness/audit/sql-scanner.ts +289 -0
- package/os/correctness/audit/sql-schema-conform.test.ts +170 -0
- package/os/correctness/audit/sql-schema-conform.ts +178 -0
- package/os/correctness/audit/state-transitions-coverage.test.ts +141 -0
- package/os/correctness/audit/state-transitions-coverage.ts +271 -0
- package/os/correctness/audit/tests/git-fixture.ts +98 -0
- package/os/correctness/audit/types.ts +91 -0
- package/os/correctness/correctness-capture.test.ts +107 -0
- package/os/correctness/correctness-chain.test.ts +232 -0
- package/os/correctness/correctness-coverage.test.ts +86 -0
- package/os/correctness/correctness-mode.test.ts +108 -0
- package/os/correctness/correctness-substrate.test.ts +64 -0
- package/os/correctness/correctness.module.ts +182 -0
- package/os/correctness/gate/anchor-events.test.ts +77 -0
- package/os/correctness/gate/freeze-coverage.test.ts +218 -0
- package/os/correctness/gate/freeze-diff.test.ts +110 -0
- package/os/correctness/gate/frozen.ts +399 -0
- package/os/correctness/gate/gate-mode.test.ts +76 -0
- package/os/correctness/gate/hardening.test.ts +175 -0
- package/os/correctness/gate/oracle-edit.test.ts +83 -0
- package/os/correctness/gate/oracle-origin.test.ts +142 -0
- package/os/correctness/gate/origin.ts +175 -0
- package/os/correctness/gate/repo.ts +102 -0
- package/os/correctness/gate/run.ts +547 -0
- package/os/correctness/gate/runner.ts +136 -0
- package/os/correctness/gate/substrate-attestation.test.ts +71 -0
- package/os/correctness/gate/tests/gate-fixture.ts +205 -0
- package/os/correctness/gate/tier-high.test.ts +92 -0
- package/os/correctness/gate/types.ts +144 -0
- package/os/correctness/handlers/audit.ts +107 -0
- package/os/correctness/handlers/gate.ts +75 -0
- package/os/correctness/handlers/validate.ts +514 -0
- package/os/correctness/index.ts +24 -0
- package/os/correctness/manifest-schema.ts +174 -0
- package/os/correctness/references.ts +143 -0
- package/os/correctness/tests/fixture-workspace.ts +119 -0
- package/os/correctness/workspace.ts +167 -0
- package/os/flow/correctness-step.ts +166 -0
- package/os/flow/digest.ts +40 -1
- package/os/flow/dirty-classify.ts +13 -0
- package/os/flow/flow.module.ts +20 -4
- package/os/flow/handlers/flow-check.ts +17 -18
- package/os/flow/handlers/flow-digest.ts +11 -1
- package/os/flow/handlers/flow-integrate.ts +191 -39
- package/os/flow/handlers/flow-open.ts +24 -31
- package/os/flow/index.ts +5 -7
- package/os/flow/post-rebase-regen.ts +170 -0
- package/os/flow/preflight.ts +361 -27
- package/os/flow/publish.ts +23 -4
- package/os/flow/tests/flow-detachable.test.ts +31 -0
- package/os/flow/tests/flow-digest-correctness-trail.test.ts +55 -0
- package/os/flow/tests/flow-integrate-correctness-gate.test.ts +275 -0
- package/os/flow/tests/flow-integrate.post-rebase-regen.test.ts +234 -0
- package/os/flow/tests/flow-integrate.preflight.test.ts +26 -5
- package/os/flow/tests/flow-integrate.test.ts +77 -10
- package/os/flow/tests/helpers.ts +45 -24
- package/os/flow/tests/lockfile-induced.test.ts +328 -0
- package/os/gate-run/detach.ts +106 -0
- package/os/gate-run/gate-run.module.ts +25 -0
- package/os/gate-run/index.ts +16 -0
- package/os/gate-run/record.ts +194 -0
- package/os/gate-run/status.ts +201 -0
- package/os/gate-run/tests/gate-run-detach.test.ts +144 -0
- package/os/gate-run/tests/gate-run-record.test.ts +200 -0
- package/os/gate-run/tests/gate-run-status.test.ts +114 -0
- package/os/gate-run/types.ts +73 -0
- package/os/rfc/evidence-annotation.ts +61 -0
- package/os/rfc/handlers/fixed-inputs.test.ts +70 -0
- package/os/rfc/handlers/fixed-inputs.ts +11 -1
- package/os/rfc/handlers/implement-stamp-promotes.test.ts +214 -0
- package/os/rfc/handlers/implement-stamp-promotes.ts +79 -0
- package/os/rfc/handlers/implement-stamp.ts +40 -29
- package/os/rfc/handlers/list-create.test.ts +14 -5
- package/os/rfc/handlers/validate-evidence-shape.test.ts +218 -0
- package/os/rfc/handlers/validate-probe-meta.test.ts +71 -0
- package/os/rfc/handlers/validate-rules.ts +211 -21
- package/os/rfc/handlers/validate-transient-probes.test.ts +222 -0
- package/os/rfc/rfc-0000-template.md +10 -10
- package/os/rfc/rfc.module.ts +21 -7
- package/os/rfc/types.ts +16 -2
- package/os/rfc/verify-workspace-manifest.test.ts +55 -0
- package/os/rfc/verify-workspace.ts +167 -0
- package/os/system/tests/helpers.ts +6 -1
- package/package.json +57 -1
- package/profiles/typescript.yaml +16 -0
- package/skills/_shared/agent-operating-model.md +4 -0
- package/skills/fo/fo-idea-audit/SKILL.md +4 -0
- package/skills/fo/fo-idea-create-rfc/SKILL.md +6 -2
- package/skills/fo/fo-idea-implement/SKILL.md +8 -2
- package/skills/fo/fo-review/SKILL.md +16 -2
- package/skills/fo/fo-session-retro/SKILL.md +4 -2
- package/src/cli-flags.ts +7 -0
- package/src/command-modules.ts +62 -0
- package/src/config/forge-config.ts +37 -11
- package/src/correctness/index.ts +192 -0
- package/src/correctness/schema-hash.ts +59 -0
- package/src/onboarding/agents-generate.ts +20 -3
- package/src/onboarding/create.ts +59 -9
- package/src/tests/agents-generate-detach.test.ts +126 -0
- package/src/tests/codebase-measure-rfc-1581.test.ts +260 -0
- package/src/tests/command-modules.test.ts +34 -0
- package/src/types.ts +9 -8
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1578 AC-8: RFC-IMP-16 — a promoted criterion without a matching
|
|
4
|
+
`rfc-ac` manifest entry refuses the stamp in a project that binds a
|
|
5
|
+
correctness manifest, warns in a project that binds none; plus V-55 on
|
|
6
|
+
`promotes` entries that are not the RFC's own criteria.</purpose>
|
|
7
|
+
<non-goals>
|
|
8
|
+
<item>Not a contract source of truth — the gate owns behaviour.</item>
|
|
9
|
+
</non-goals>
|
|
10
|
+
</MODULE_CONTRACT>
|
|
11
|
+
<CHANGE_SUMMARY>
|
|
12
|
+
<item>RFC-1578: initial suite.</item>
|
|
13
|
+
<item>RFC-1578: correctness manifest, validator, promotes gate
|
|
14
|
+
|
|
15
|
+
Add os/correctness (forge/correctness-manifest@1, correctness.manifest.validate CORR-01..09), bindings.paths.correctnessManifest, bindings.commands.checkRun and the correctness section, promotes with V-55 and RFC-IMP-16, the typescript profile skeleton, reference pages, and the promotes marking in fo-idea-create-rfc/fo-idea-audit. Repoint the RFC-1391 AC-8 registry test at src/command-modules.ts (stale since RFC-1573) and close the types.ts header comment without a glob-shaped terminator (EC-33).</item>
|
|
16
|
+
<item>RFC-1578: close review REVIEW-CODE-2026-11-12-08 findings
|
|
17
|
+
|
|
18
|
+
F1 code-only anchor scan (markdown fences never declare anchors); F2 generated index as a re-verified hint, scan on any miss; F3 RFC-IMP-16 asserted through rfc.implement.stamp; F4 forge create patches only absent/null keys; F5 type: refs normalized; F6/F10/F11 capture existence via existsSync, future recordedAt and workspace-escaping paths are CORR-07; F7 V-55 reuses criteriaEval; F8 validator inventory regenerated; F9 binding-driven reads; F12 git listing, index hint, create patch tests; DEV-1 single sidecar spelling; DEV-2 output field dropped.</item>
|
|
19
|
+
</CHANGE_SUMMARY>
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { execFileSync } from "node:child_process";
|
|
23
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
24
|
+
import { tmpdir } from "node:os";
|
|
25
|
+
import path from "node:path";
|
|
26
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
27
|
+
|
|
28
|
+
import { BASE_MANIFEST, makeWorkspace } from "../../correctness/tests/fixture-workspace.ts";
|
|
29
|
+
import type { ForgeCommandInput, ForgeRuntimeContext } from "../../../src/types.ts";
|
|
30
|
+
import { runRfcImplementStamp } from "./implement-stamp.ts";
|
|
31
|
+
import { evaluatePromotesGate } from "./implement-stamp-promotes.ts";
|
|
32
|
+
import { validateSingleRfc, type AddViolationFn } from "./validate-rules.ts";
|
|
33
|
+
|
|
34
|
+
const cleanups: (() => void)[] = [];
|
|
35
|
+
afterEach(() => cleanups.splice(0).forEach((c) => c()));
|
|
36
|
+
const ws = (opts: Parameters<typeof makeWorkspace>[0]) => {
|
|
37
|
+
const w = makeWorkspace(opts);
|
|
38
|
+
cleanups.push(w.cleanup);
|
|
39
|
+
return w.root;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const RFC_AC_ENTRY = ` - id: CM-lifecycle-01
|
|
43
|
+
source: rfc-ac
|
|
44
|
+
ref: RFC-0005/AC-3
|
|
45
|
+
seam: lifecycle
|
|
46
|
+
anchors: [INV-dispatch-01]
|
|
47
|
+
oracles:
|
|
48
|
+
- check: test:src/dispatch.schema.test.ts
|
|
49
|
+
substrate: L2
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
describe("RFC-IMP-16 promotion gate", () => {
|
|
53
|
+
it("AC-8: refuses when a promoted criterion has no rfc-ac manifest entry and a manifest is bound", () => {
|
|
54
|
+
const root = ws({});
|
|
55
|
+
const res = evaluatePromotesGate({
|
|
56
|
+
targetId: "RFC-0005",
|
|
57
|
+
frontmatter: { promotes: ["AC-3", "AC-4"] },
|
|
58
|
+
workspaceRoot: root,
|
|
59
|
+
});
|
|
60
|
+
expect(res.errors).toHaveLength(1);
|
|
61
|
+
expect(res.errors[0]!.rule).toBe("RFC-IMP-16");
|
|
62
|
+
expect(res.errors[0]!.message).toMatch(/AC-3, AC-4/);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("passes once every promoted criterion has an entry", () => {
|
|
66
|
+
const root = ws({
|
|
67
|
+
manifest: BASE_MANIFEST.replace("support: []", `${RFC_AC_ENTRY}support: []`),
|
|
68
|
+
});
|
|
69
|
+
const res = evaluatePromotesGate({
|
|
70
|
+
targetId: "RFC-0005",
|
|
71
|
+
frontmatter: { promotes: ["AC-3"] },
|
|
72
|
+
workspaceRoot: root,
|
|
73
|
+
});
|
|
74
|
+
expect(res.errors).toEqual([]);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it("warns, never refuses, in a project without a manifest binding", () => {
|
|
78
|
+
const root = ws({ manifestBinding: null, manifest: null });
|
|
79
|
+
const res = evaluatePromotesGate({
|
|
80
|
+
targetId: "RFC-0005",
|
|
81
|
+
frontmatter: { promotes: ["AC-3"] },
|
|
82
|
+
workspaceRoot: root,
|
|
83
|
+
});
|
|
84
|
+
expect(res.errors).toEqual([]);
|
|
85
|
+
expect(res.warnings[0]!.rule).toBe("RFC-IMP-16");
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("an unreadable bound manifest refuses", () => {
|
|
89
|
+
const root = ws({ manifest: "schema: [" });
|
|
90
|
+
const res = evaluatePromotesGate({
|
|
91
|
+
targetId: "RFC-0005",
|
|
92
|
+
frontmatter: { promotes: ["AC-3"] },
|
|
93
|
+
workspaceRoot: root,
|
|
94
|
+
});
|
|
95
|
+
expect(res.errors[0]!.message).toMatch(/cannot be read/);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it("an RFC without promotes is untouched", () => {
|
|
99
|
+
const res = evaluatePromotesGate({
|
|
100
|
+
targetId: "RFC-0005",
|
|
101
|
+
frontmatter: {},
|
|
102
|
+
workspaceRoot: ws({}),
|
|
103
|
+
});
|
|
104
|
+
expect(res).toEqual({ errors: [], warnings: [] });
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// ─── V-55 (rfc.validate) ────────────────────────────────────────────────────
|
|
109
|
+
|
|
110
|
+
describe("V-55 promotes names only the RFC's own criteria", () => {
|
|
111
|
+
const body =
|
|
112
|
+
"# RFC-9999\n\n## Acceptance criteria\n\n- [ ] AC-1: THE x SHALL y (evidence: probe:AC-1)\n";
|
|
113
|
+
const run = async (promotes: unknown) => {
|
|
114
|
+
const seen: { rule: string; message?: string; severity?: string }[] = [];
|
|
115
|
+
const add: AddViolationFn = (_id, _file, rule, message, severity) =>
|
|
116
|
+
void seen.push({ rule, message, severity });
|
|
117
|
+
await validateSingleRfc(
|
|
118
|
+
"rfc-9999-test.md",
|
|
119
|
+
{
|
|
120
|
+
frontmatter: {
|
|
121
|
+
id: "RFC-9999",
|
|
122
|
+
title: "Test",
|
|
123
|
+
status: "draft",
|
|
124
|
+
kind: "policy",
|
|
125
|
+
scope: "workspace",
|
|
126
|
+
owners: ["architecture"],
|
|
127
|
+
createdAt: "2026-11-12",
|
|
128
|
+
updatedAt: "2026-11-12",
|
|
129
|
+
promotes,
|
|
130
|
+
},
|
|
131
|
+
body,
|
|
132
|
+
},
|
|
133
|
+
new Map(),
|
|
134
|
+
new Map(),
|
|
135
|
+
new Set(),
|
|
136
|
+
new Set(),
|
|
137
|
+
new Set(),
|
|
138
|
+
tmpdir(),
|
|
139
|
+
add,
|
|
140
|
+
);
|
|
141
|
+
return seen.filter((s) => s.rule === "V-55");
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
it("accepts a promoted criterion the RFC declares", async () => {
|
|
145
|
+
expect(await run(["AC-1"])).toEqual([]);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
it("rejects an undeclared criterion and a non-AC entry", async () => {
|
|
149
|
+
const v = await run(["AC-2", "FI-1"]);
|
|
150
|
+
expect(v.map((x) => x.severity)).toEqual(["error", "error"]);
|
|
151
|
+
expect(v[0]!.message).toMatch(/AC-2/);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
describe("RFC-IMP-16 through rfc.implement.stamp", () => {
|
|
156
|
+
it("AC-8: the stamp refuses with RFC-IMP-16 when a promoted criterion has no rfc-ac entry", async () => {
|
|
157
|
+
const root = ws({});
|
|
158
|
+
const rfc = [
|
|
159
|
+
"---",
|
|
160
|
+
"id: RFC-0100",
|
|
161
|
+
'title: "Promotes"',
|
|
162
|
+
"status: accepted",
|
|
163
|
+
"kind: command",
|
|
164
|
+
"scope: workspace",
|
|
165
|
+
"owners:",
|
|
166
|
+
" - architecture",
|
|
167
|
+
"reviewers:",
|
|
168
|
+
" - human:tester",
|
|
169
|
+
"createdAt: 2026-10-01",
|
|
170
|
+
"updatedAt: 2026-10-01",
|
|
171
|
+
"promotes: [AC-1]",
|
|
172
|
+
"---",
|
|
173
|
+
"",
|
|
174
|
+
"# RFC-0100",
|
|
175
|
+
"",
|
|
176
|
+
"## Acceptance criteria",
|
|
177
|
+
"",
|
|
178
|
+
"- [x] AC-1: THE dispatch SHALL write send_ready (evidence: test:src/dispatch.schema.test.ts)",
|
|
179
|
+
"",
|
|
180
|
+
].join("\n");
|
|
181
|
+
mkdirSync(path.join(root, "docs/rfcs"), { recursive: true });
|
|
182
|
+
writeFileSync(path.join(root, "docs/rfcs/rfc-0100-promotes.md"), rfc);
|
|
183
|
+
const git = (args: string[]) =>
|
|
184
|
+
execFileSync("git", args, { cwd: root, encoding: "utf8" }).trim();
|
|
185
|
+
git(["init", "-q"]);
|
|
186
|
+
git(["config", "user.email", "t@t.t"]);
|
|
187
|
+
git(["config", "user.name", "t"]);
|
|
188
|
+
git(["add", "-A"]);
|
|
189
|
+
git(["commit", "-qm", "implement: RFC-0100 dispatch\n\nX-RFC: RFC-0100"]);
|
|
190
|
+
const sha = git(["rev-parse", "HEAD"]);
|
|
191
|
+
const context = {
|
|
192
|
+
workspaceRoot: root,
|
|
193
|
+
logger: {
|
|
194
|
+
info: () => {},
|
|
195
|
+
warn: () => {},
|
|
196
|
+
error: () => {},
|
|
197
|
+
section: () => {},
|
|
198
|
+
success: () => {},
|
|
199
|
+
},
|
|
200
|
+
outputFormat: "json",
|
|
201
|
+
dryRun: false,
|
|
202
|
+
} as unknown as ForgeRuntimeContext;
|
|
203
|
+
const result = await runRfcImplementStamp(
|
|
204
|
+
{
|
|
205
|
+
argv: [],
|
|
206
|
+
flags: { id: "RFC-0100", "implementation-commit": sha, "no-repair": true },
|
|
207
|
+
} as unknown as ForgeCommandInput,
|
|
208
|
+
context,
|
|
209
|
+
);
|
|
210
|
+
const rules = (result.data?.violations ?? []).map((v) => v.rule);
|
|
211
|
+
expect(rules, "the stamp path must surface the promotion gate").toContain("RFC-IMP-16");
|
|
212
|
+
expect(result.exitCode).not.toBe(0);
|
|
213
|
+
});
|
|
214
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1578: RFC-IMP-16 — at `rfc.implement.stamp`, every acceptance
|
|
4
|
+
criterion an RFC `promotes` needs a product correctness-manifest entry with
|
|
5
|
+
`source: rfc-ac` and `ref: RFC-NNNN/AC-N`. Refuses when the project binds a
|
|
6
|
+
manifest (`bindings.paths.correctnessManifest`); warns when it binds none.</purpose>
|
|
7
|
+
<non-goals>
|
|
8
|
+
<item>Do not validate the rest of the manifest — correctness.manifest.validate owns CORR-*.</item>
|
|
9
|
+
<item>Do not check that a promoted id is a real criterion — V-55 (rfc.validate) owns that.</item>
|
|
10
|
+
</non-goals>
|
|
11
|
+
</MODULE_CONTRACT>
|
|
12
|
+
<CHANGE_SUMMARY>
|
|
13
|
+
<item>RFC-1578: initial RFC-IMP-16 promotion gate.</item>
|
|
14
|
+
<item>RFC-1578: correctness manifest, validator, promotes gate
|
|
15
|
+
|
|
16
|
+
Add os/correctness (forge/correctness-manifest@1, correctness.manifest.validate CORR-01..09), bindings.paths.correctnessManifest, bindings.commands.checkRun and the correctness section, promotes with V-55 and RFC-IMP-16, the typescript profile skeleton, reference pages, and the promotes marking in fo-idea-create-rfc/fo-idea-audit. Repoint the RFC-1391 AC-8 registry test at src/command-modules.ts (stale since RFC-1573) and close the types.ts header comment without a glob-shaped terminator (EC-33).</item>
|
|
17
|
+
</CHANGE_SUMMARY>
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { readFileSync } from "node:fs";
|
|
21
|
+
import path from "node:path";
|
|
22
|
+
import { parse as parseYaml } from "yaml";
|
|
23
|
+
|
|
24
|
+
import { correctnessManifestSchema } from "../../correctness/manifest-schema.ts";
|
|
25
|
+
import { readCorrectnessSettings } from "../../correctness/workspace.ts";
|
|
26
|
+
import type { OriginGateResult } from "./implement-stamp-origin.ts";
|
|
27
|
+
|
|
28
|
+
export interface PromotesGateInput {
|
|
29
|
+
targetId: string;
|
|
30
|
+
frontmatter: Record<string, unknown>;
|
|
31
|
+
workspaceRoot: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function evaluatePromotesGate(input: PromotesGateInput): OriginGateResult {
|
|
35
|
+
const result: OriginGateResult = { errors: [], warnings: [] };
|
|
36
|
+
const raw = input.frontmatter["promotes"];
|
|
37
|
+
const promoted = Array.isArray(raw) ? raw.map(String).filter((id) => /^AC-\d+$/.test(id)) : [];
|
|
38
|
+
if (promoted.length === 0) return result;
|
|
39
|
+
|
|
40
|
+
const settings = readCorrectnessSettings(input.workspaceRoot);
|
|
41
|
+
if (!settings.manifestPath) {
|
|
42
|
+
result.warnings.push({
|
|
43
|
+
rule: "RFC-IMP-16",
|
|
44
|
+
message: `${input.targetId} promotes ${promoted.join(", ")} but the project binds no correctness manifest (bindings.paths.correctnessManifest) — the promoted criteria are not tracked after the stamp`,
|
|
45
|
+
fixHint:
|
|
46
|
+
"bind bindings.paths.correctnessManifest and add rfc-ac entries, or accept that promotion is untracked in this project",
|
|
47
|
+
});
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
let refs: Set<string>;
|
|
52
|
+
try {
|
|
53
|
+
const doc = parseYaml(
|
|
54
|
+
readFileSync(path.join(input.workspaceRoot, settings.manifestPath), "utf8"),
|
|
55
|
+
);
|
|
56
|
+
const parsed = correctnessManifestSchema.safeParse(doc ?? {});
|
|
57
|
+
if (!parsed.success) throw new Error(parsed.error.issues.map((i) => i.message).join("; "));
|
|
58
|
+
refs = new Set(
|
|
59
|
+
parsed.data.entries.filter((e) => e.source === "rfc-ac" && e.ref).map((e) => e.ref!),
|
|
60
|
+
);
|
|
61
|
+
} catch (err) {
|
|
62
|
+
result.errors.push({
|
|
63
|
+
rule: "RFC-IMP-16",
|
|
64
|
+
message: `${input.targetId} promotes ${promoted.join(", ")} but the correctness manifest ${settings.manifestPath} cannot be read: ${(err as Error).message}`,
|
|
65
|
+
fixHint: "run correctness.manifest.validate and repair the manifest",
|
|
66
|
+
});
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const missing = promoted.filter((ac) => !refs.has(`${input.targetId}/${ac}`));
|
|
71
|
+
if (missing.length > 0) {
|
|
72
|
+
result.errors.push({
|
|
73
|
+
rule: "RFC-IMP-16",
|
|
74
|
+
message: `${input.targetId} promotes ${missing.join(", ")} with no matching manifest entry (source: rfc-ac, ref: ${input.targetId}/<AC>) in ${settings.manifestPath}`,
|
|
75
|
+
fixHint: `add a manifest entry per promoted criterion (source: rfc-ac, ref: ${input.targetId}/${missing[0]}), anchored and with an oracle`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
@@ -12,12 +12,14 @@ verification evidence, and atomically mutates RFC frontmatter.
|
|
|
12
12
|
</non-goals>
|
|
13
13
|
</MODULE_CONTRACT>
|
|
14
14
|
<CHANGE_SUMMARY>
|
|
15
|
-
<item>RFC-1454: review deviations recorded in the RFC — IMP-15 gate, V-49 provenance, skill contract</item>
|
|
16
|
-
<item>RFC-1483: self-sufficient implement stamp — default repair pass, ordered remediation checklist, --no-repair</item>
|
|
17
15
|
<item>RFC-1504: step 4 — shared stamp lock for rfc and adr stamp handlers</item>
|
|
18
16
|
<item>RFC-1504: review fixes — legacy acquiredAt fallback, atomic break claim, verified stamp release, onStale warnings</item>
|
|
19
17
|
<item>RFC-1516: add an evidence-freshness window to the stamp-sync chain for rfc-1516</item>
|
|
20
|
-
<
|
|
18
|
+
<item>RFC-1569: lint rfc evidence annotations and transient probe targets</item>
|
|
19
|
+
<item>RFC-1578: correctness manifest, validator, promotes gate
|
|
20
|
+
|
|
21
|
+
Add os/correctness (forge/correctness-manifest@1, correctness.manifest.validate CORR-01..09), bindings.paths.correctnessManifest, bindings.commands.checkRun and the correctness section, promotes with V-55 and RFC-IMP-16, the typescript profile skeleton, reference pages, and the promotes marking in fo-idea-create-rfc/fo-idea-audit. Repoint the RFC-1391 AC-8 registry test at src/command-modules.ts (stale since RFC-1573) and close the types.ts header comment without a glob-shaped terminator (EC-33).</item>
|
|
22
|
+
<history>RFC-0268, RFC-0476, RFC-0756, RFC-0795, RFC-0997, RFC-1053, RFC-1097, RFC-1249, RFC-1271, RFC-1306, RFC-1310, RFC-1321, RFC-1322, RFC-1330, RFC-1333, RFC-1383, RFC-1391, RFC-1453, RFC-1454, RFC-1483, RFC-IMP-07</history>
|
|
21
23
|
</CHANGE_SUMMARY>
|
|
22
24
|
*/
|
|
23
25
|
|
|
@@ -40,7 +42,9 @@ import {
|
|
|
40
42
|
loadRfcStatusMap,
|
|
41
43
|
} from "../frontmatter-io.ts";
|
|
42
44
|
import { evaluateAcceptanceCriteria, stripFencedCodeBlocks } from "./validate-rules.ts";
|
|
45
|
+
import { parseEvidenceAnnotation } from "../evidence-annotation.ts";
|
|
43
46
|
import { evaluateDeviationGate } from "./implement-stamp-deviations.ts";
|
|
47
|
+
import { evaluatePromotesGate } from "./implement-stamp-promotes.ts";
|
|
44
48
|
import { toIsoDate } from "./shared.ts";
|
|
45
49
|
import { byteHashHex, normalizeProbes, runRfcVerificationEmit } from "../verification-evidence.ts";
|
|
46
50
|
import {
|
|
@@ -388,23 +392,21 @@ export async function resolveCriterionEvidence(
|
|
|
388
392
|
return false;
|
|
389
393
|
}
|
|
390
394
|
};
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
return statFile(filePath);
|
|
395
|
+
// RFC-1569: the annotation grammar lives in os/rfc/evidence-annotation.ts —
|
|
396
|
+
// this resolver consumes it, no second regex here.
|
|
397
|
+
const parsed = parseEvidenceAnnotation(annotation);
|
|
398
|
+
switch (parsed.kind) {
|
|
399
|
+
case "probe":
|
|
400
|
+
return (envelope?.probes ?? []).some(
|
|
401
|
+
(r) => r.probe?.criterion === parsed.criterion && r.ok === true,
|
|
402
|
+
);
|
|
403
|
+
case "test":
|
|
404
|
+
case "file":
|
|
405
|
+
case "path-line":
|
|
406
|
+
return statFile(parsed.path);
|
|
407
|
+
case "invalid":
|
|
408
|
+
return false;
|
|
406
409
|
}
|
|
407
|
-
return false;
|
|
408
410
|
}
|
|
409
411
|
|
|
410
412
|
/**
|
|
@@ -556,7 +558,11 @@ async function evaluateStampEvidenceGates(opts: {
|
|
|
556
558
|
// ── RFC-IMP-10 / RFC-IMP-11: git-derived origin gates (RFC-1330) ─────────
|
|
557
559
|
// Derived fresh at stamp time (head = HEAD) — the committed envelope's
|
|
558
560
|
// origin records are volatile context and may predate later commits.
|
|
559
|
-
if (
|
|
561
|
+
if (
|
|
562
|
+
runIndependent &&
|
|
563
|
+
hasProbes &&
|
|
564
|
+
String(opts.frontmatter["createdAt"] ?? "") >= RFC_ORIGIN_CUTOFF
|
|
565
|
+
) {
|
|
560
566
|
const probes = acceptance as AcceptanceProbe[];
|
|
561
567
|
const origins = await deriveProbeOrigins({
|
|
562
568
|
git: createOriginGit(opts.workspaceRoot),
|
|
@@ -650,6 +656,17 @@ async function evaluateStampEvidenceGates(opts: {
|
|
|
650
656
|
violations.push(...deviations.errors);
|
|
651
657
|
}
|
|
652
658
|
|
|
659
|
+
// ── RFC-IMP-16: promoted criteria need correctness-manifest entries (RFC-1578) ──
|
|
660
|
+
if (runIndependent) {
|
|
661
|
+
const promotes = evaluatePromotesGate({
|
|
662
|
+
targetId,
|
|
663
|
+
frontmatter: opts.frontmatter,
|
|
664
|
+
workspaceRoot: opts.workspaceRoot,
|
|
665
|
+
});
|
|
666
|
+
violations.push(...promotes.errors);
|
|
667
|
+
warnings.push(...promotes.warnings);
|
|
668
|
+
}
|
|
669
|
+
|
|
653
670
|
// ── RFC-IMP-06: probe-bearing post-cutoff RFCs need a passing envelope ────
|
|
654
671
|
if (requiresEvidence && runDependent && !opts.suppressRepairable) {
|
|
655
672
|
if (!evidenceCheck.exists || evidenceCheck.overall !== "pass") {
|
|
@@ -899,9 +916,7 @@ export async function runRfcImplementStamp(
|
|
|
899
916
|
// sync chain — probes re-execute even inside the freshness window.
|
|
900
917
|
syncReport = await context.invoke("rfc.evidence.sync", {
|
|
901
918
|
id: targetId,
|
|
902
|
-
...(input.flags["no-evidence-reuse"] === true
|
|
903
|
-
? { "no-evidence-reuse": "true" }
|
|
904
|
-
: {}),
|
|
919
|
+
...(input.flags["no-evidence-reuse"] === true ? { "no-evidence-reuse": "true" } : {}),
|
|
905
920
|
});
|
|
906
921
|
} catch (err) {
|
|
907
922
|
violations.push({
|
|
@@ -1238,9 +1253,7 @@ export async function runRfcImplementStamp(
|
|
|
1238
1253
|
flags: {
|
|
1239
1254
|
id: targetId,
|
|
1240
1255
|
...(waiveOutcome ? { "waive-outcome": waiveOutcome } : {}),
|
|
1241
|
-
...(input.flags["no-evidence-reuse"] === true
|
|
1242
|
-
? { "no-evidence-reuse": true }
|
|
1243
|
-
: {}),
|
|
1256
|
+
...(input.flags["no-evidence-reuse"] === true ? { "no-evidence-reuse": true } : {}),
|
|
1244
1257
|
},
|
|
1245
1258
|
},
|
|
1246
1259
|
context,
|
|
@@ -1459,9 +1472,7 @@ export async function runRfcImplementStamp(
|
|
|
1459
1472
|
flags: {
|
|
1460
1473
|
id: targetId,
|
|
1461
1474
|
...(waiveOutcome ? { "waive-outcome": waiveOutcome } : {}),
|
|
1462
|
-
...(input.flags["no-evidence-reuse"] === true
|
|
1463
|
-
? { "no-evidence-reuse": true }
|
|
1464
|
-
: {}),
|
|
1475
|
+
...(input.flags["no-evidence-reuse"] === true ? { "no-evidence-reuse": true } : {}),
|
|
1465
1476
|
},
|
|
1466
1477
|
},
|
|
1467
1478
|
context,
|
|
@@ -12,11 +12,12 @@ with candidates listed.
|
|
|
12
12
|
</non-goals>
|
|
13
13
|
</MODULE_CONTRACT>
|
|
14
14
|
<CHANGE_SUMMARY>
|
|
15
|
-
<item>RFC-1485: sweep compass headers — forge-os-rfc</item>
|
|
16
15
|
<item>RFC-1482: extract-safe RFC-1482 template path + changelog for 9.1.0</item>
|
|
17
16
|
<item>RFC-1514: attach corrected invocations to blocking diagnostics so retry is one-shot</item>
|
|
18
17
|
<item>RFC-1534: lint probe patterns, sync amends counterparts, name next free ledger id</item>
|
|
19
18
|
<item>RFC-1546: derive-and-repair recoverable state across flow surfaces (AC-1..AC-5)</item>
|
|
19
|
+
<item>RFC-1569: lint rfc evidence annotations and transient probe targets</item>
|
|
20
|
+
<history>RFC-1485</history>
|
|
20
21
|
</CHANGE_SUMMARY>
|
|
21
22
|
*/
|
|
22
23
|
|
|
@@ -187,7 +188,7 @@ describe("RFC-1482 validation-compliant skeleton", () => {
|
|
|
187
188
|
await rm(root, { recursive: true, force: true });
|
|
188
189
|
});
|
|
189
190
|
|
|
190
|
-
test("AC-1: emitted draft passes rfc.validate with zero V-45/V-48/V-50 violations", async () => {
|
|
191
|
+
test("AC-1: emitted draft passes rfc.validate with zero V-45/V-48/V-50/V-53/V-54 violations", async () => {
|
|
191
192
|
const result = await runRfcCreate(
|
|
192
193
|
{ flags: flags({ title: "Rotate the cache eviction cadence" }) } as never,
|
|
193
194
|
context(),
|
|
@@ -196,14 +197,22 @@ describe("RFC-1482 validation-compliant skeleton", () => {
|
|
|
196
197
|
const id = result.data!.id!;
|
|
197
198
|
const v = await runRfcValidate({ argv: [], flags: { id } } as never, context());
|
|
198
199
|
const violations = v.data?.violations ?? [];
|
|
199
|
-
const named = violations.filter((x) =>
|
|
200
|
+
const named = violations.filter((x) =>
|
|
201
|
+
["V-45", "V-48", "V-50", "V-53", "V-54"].includes(x.rule),
|
|
202
|
+
);
|
|
200
203
|
expect(named, JSON.stringify(violations, null, 1)).toEqual([]);
|
|
201
204
|
expect(v.data?.status, JSON.stringify(violations, null, 1)).toBe("pass");
|
|
202
205
|
});
|
|
203
206
|
|
|
204
207
|
test("AC-2: --proposed/--added seed commands.* and emit one reachable stub each", async () => {
|
|
205
208
|
const result = await runRfcCreate(
|
|
206
|
-
{
|
|
209
|
+
{
|
|
210
|
+
flags: flags({
|
|
211
|
+
title: "Tame the registry loader",
|
|
212
|
+
proposed: "foo.bar,baz.qux",
|
|
213
|
+
added: "foo.new",
|
|
214
|
+
}),
|
|
215
|
+
} as never,
|
|
207
216
|
context(),
|
|
208
217
|
);
|
|
209
218
|
expect(result.data?.status).toBe("ok");
|
|
@@ -224,7 +233,7 @@ describe("RFC-1482 validation-compliant skeleton", () => {
|
|
|
224
233
|
);
|
|
225
234
|
const body = await readFile(join(root, result.data!.file!), "utf8");
|
|
226
235
|
expect(body).toContain("## Fixed inputs");
|
|
227
|
-
expect(body).
|
|
236
|
+
expect(body).toMatch(/\|\s*ID\s*\| Value \| Source \| Checked by \|/);
|
|
228
237
|
expect(body).not.toMatch(/^\|\s*FI-/m);
|
|
229
238
|
});
|
|
230
239
|
|