@warpgogol/forge 9.3.0 → 9.4.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/AGENTS.md +32 -0
- package/CHANGELOG.md +33 -0
- package/README.md +2 -2
- package/bin/cli.ts +4 -4
- package/dist/bin/cli.js +4 -4
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/handlers/list-create.d.ts.map +1 -1
- package/dist/os/adr/handlers/list-create.js +23 -2
- package/dist/os/adr/handlers/list-create.js.map +1 -1
- package/dist/os/adr/types.d.ts +2 -0
- package/dist/os/adr/types.d.ts.map +1 -1
- package/dist/os/adr/types.js +2 -2
- package/dist/os/adr/types.js.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-audit-handler.js +3 -1
- package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js +6 -12
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js.map +1 -1
- package/dist/os/compass/handlers/git-revision.d.ts +2 -0
- package/dist/os/compass/handlers/git-revision.d.ts.map +1 -1
- package/dist/os/compass/handlers/git-revision.js +7 -2
- package/dist/os/compass/handlers/git-revision.js.map +1 -1
- package/dist/os/compass/handlers/summary-record.d.ts.map +1 -1
- package/dist/os/compass/handlers/summary-record.js +24 -14
- package/dist/os/compass/handlers/summary-record.js.map +1 -1
- package/dist/os/conformance/conformance.module.d.ts.map +1 -1
- package/dist/os/conformance/conformance.module.js +21 -4
- package/dist/os/conformance/conformance.module.js.map +1 -1
- package/dist/os/conformance/handlers/conformance-validate.d.ts.map +1 -1
- package/dist/os/conformance/handlers/conformance-validate.js +64 -8
- package/dist/os/conformance/handlers/conformance-validate.js.map +1 -1
- package/dist/os/core/archive-regen.d.ts +99 -0
- package/dist/os/core/archive-regen.d.ts.map +1 -0
- package/dist/os/core/archive-regen.js +220 -0
- package/dist/os/core/archive-regen.js.map +1 -0
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +159 -18
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/handlers/assets-helpers.d.ts.map +1 -1
- package/dist/os/core/handlers/assets-helpers.js +8 -3
- package/dist/os/core/handlers/assets-helpers.js.map +1 -1
- package/dist/os/core/handlers/forge-autonomy-validate.d.ts.map +1 -1
- package/dist/os/core/handlers/forge-autonomy-validate.js +3 -1
- package/dist/os/core/handlers/forge-autonomy-validate.js.map +1 -1
- package/dist/os/core/handlers/package-health.d.ts +130 -0
- package/dist/os/core/handlers/package-health.d.ts.map +1 -1
- package/dist/os/core/handlers/package-health.js +548 -7
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/core/handlers/release-prepare.d.ts.map +1 -1
- package/dist/os/core/handlers/release-prepare.js +5 -2
- package/dist/os/core/handlers/release-prepare.js.map +1 -1
- package/dist/os/flow/digest.d.ts.map +1 -1
- package/dist/os/flow/digest.js +3 -1
- package/dist/os/flow/digest.js.map +1 -1
- package/dist/os/flow/dirty-classify.d.ts +48 -0
- package/dist/os/flow/dirty-classify.d.ts.map +1 -0
- package/dist/os/flow/dirty-classify.js +81 -0
- package/dist/os/flow/dirty-classify.js.map +1 -0
- package/dist/os/flow/flow.module.d.ts.map +1 -1
- package/dist/os/flow/flow.module.js +85 -19
- package/dist/os/flow/flow.module.js.map +1 -1
- package/dist/os/flow/gate-engine.d.ts +13 -0
- package/dist/os/flow/gate-engine.d.ts.map +1 -0
- package/dist/os/flow/gate-engine.js +32 -0
- package/dist/os/flow/gate-engine.js.map +1 -0
- package/dist/os/flow/git.d.ts +45 -4
- package/dist/os/flow/git.d.ts.map +1 -1
- package/dist/os/flow/git.js +95 -27
- package/dist/os/flow/git.js.map +1 -1
- package/dist/os/flow/handlers/flow-backmerge.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-backmerge.js +12 -5
- package/dist/os/flow/handlers/flow-backmerge.js.map +1 -1
- package/dist/os/flow/handlers/flow-check.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-check.js +25 -3
- package/dist/os/flow/handlers/flow-check.js.map +1 -1
- package/dist/os/flow/handlers/flow-cut.d.ts +4 -1
- package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-cut.js +54 -31
- package/dist/os/flow/handlers/flow-cut.js.map +1 -1
- package/dist/os/flow/handlers/flow-discard.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-discard.js +33 -5
- package/dist/os/flow/handlers/flow-discard.js.map +1 -1
- package/dist/os/flow/handlers/flow-fix.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-fix.js +13 -10
- package/dist/os/flow/handlers/flow-fix.js.map +1 -1
- package/dist/os/flow/handlers/flow-hold.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-hold.js +13 -7
- package/dist/os/flow/handlers/flow-hold.js.map +1 -1
- package/dist/os/flow/handlers/flow-install.d.ts +2 -1
- package/dist/os/flow/handlers/flow-install.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-install.js +56 -13
- package/dist/os/flow/handlers/flow-install.js.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.d.ts +48 -2
- package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-integrate.js +536 -65
- package/dist/os/flow/handlers/flow-integrate.js.map +1 -1
- package/dist/os/flow/handlers/flow-open.d.ts +14 -0
- package/dist/os/flow/handlers/flow-open.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-open.js +117 -12
- package/dist/os/flow/handlers/flow-open.js.map +1 -1
- package/dist/os/flow/handlers/flow-status.d.ts +13 -0
- package/dist/os/flow/handlers/flow-status.d.ts.map +1 -1
- package/dist/os/flow/handlers/flow-status.js +35 -14
- package/dist/os/flow/handlers/flow-status.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 +3 -1
- package/dist/os/flow/index.js.map +1 -1
- package/dist/os/flow/line-version.d.ts.map +1 -1
- package/dist/os/flow/line-version.js +2 -1
- package/dist/os/flow/line-version.js.map +1 -1
- package/dist/os/flow/locks.d.ts +37 -1
- package/dist/os/flow/locks.d.ts.map +1 -1
- package/dist/os/flow/locks.js +34 -14
- package/dist/os/flow/locks.js.map +1 -1
- package/dist/os/flow/preflight.d.ts +114 -0
- package/dist/os/flow/preflight.d.ts.map +1 -0
- package/dist/os/flow/preflight.js +620 -0
- package/dist/os/flow/preflight.js.map +1 -0
- package/dist/os/flow/publish.d.ts +7 -0
- package/dist/os/flow/publish.d.ts.map +1 -1
- package/dist/os/flow/publish.js +165 -3
- package/dist/os/flow/publish.js.map +1 -1
- package/dist/os/flow/registry.d.ts +26 -1
- package/dist/os/flow/registry.d.ts.map +1 -1
- package/dist/os/flow/registry.js +27 -6
- package/dist/os/flow/registry.js.map +1 -1
- package/dist/os/flow/scripts.d.ts +4 -0
- package/dist/os/flow/scripts.d.ts.map +1 -1
- package/dist/os/flow/scripts.js +13 -3
- package/dist/os/flow/scripts.js.map +1 -1
- package/dist/os/flow/session-checkout.d.ts +33 -0
- package/dist/os/flow/session-checkout.d.ts.map +1 -0
- package/dist/os/flow/session-checkout.js +151 -0
- package/dist/os/flow/session-checkout.js.map +1 -0
- package/dist/os/flow/worktree-path.d.ts.map +1 -1
- package/dist/os/flow/worktree-path.js +9 -3
- package/dist/os/flow/worktree-path.js.map +1 -1
- package/dist/os/instructions/handlers/budget-validate.d.ts +1 -0
- package/dist/os/instructions/handlers/budget-validate.d.ts.map +1 -1
- package/dist/os/instructions/handlers/budget-validate.js +12 -4
- package/dist/os/instructions/handlers/budget-validate.js.map +1 -1
- package/dist/os/instructions/instructions.module.d.ts.map +1 -1
- package/dist/os/instructions/instructions.module.js +4 -1
- package/dist/os/instructions/instructions.module.js.map +1 -1
- package/dist/os/mission/open-missions.d.ts +8 -0
- package/dist/os/mission/open-missions.d.ts.map +1 -0
- package/dist/os/mission/open-missions.js +42 -0
- package/dist/os/mission/open-missions.js.map +1 -0
- package/dist/os/queue/manifest.d.ts.map +1 -1
- package/dist/os/queue/manifest.js +11 -1
- package/dist/os/queue/manifest.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts +14 -0
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +18 -10
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/decision-log.d.ts.map +1 -1
- package/dist/os/rfc/decision-log.js +11 -2
- package/dist/os/rfc/decision-log.js.map +1 -1
- package/dist/os/rfc/frontmatter-io.d.ts +23 -0
- package/dist/os/rfc/frontmatter-io.d.ts.map +1 -1
- package/dist/os/rfc/frontmatter-io.js +82 -1
- package/dist/os/rfc/frontmatter-io.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-deviations.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-deviations.js +24 -2
- package/dist/os/rfc/handlers/implement-stamp-deviations.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +16 -3
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/index-graph.d.ts.map +1 -1
- package/dist/os/rfc/handlers/index-graph.js +5 -4
- package/dist/os/rfc/handlers/index-graph.js.map +1 -1
- package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
- package/dist/os/rfc/handlers/list-create.js +83 -8
- package/dist/os/rfc/handlers/list-create.js.map +1 -1
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts +48 -0
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts.map +1 -1
- package/dist/os/rfc/handlers/rfc-evidence-sync.js +131 -2
- package/dist/os/rfc/handlers/rfc-evidence-sync.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts +21 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +77 -5
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate.js +64 -6
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/rfc/next-id.d.ts +38 -0
- package/dist/os/rfc/next-id.d.ts.map +1 -0
- package/dist/os/rfc/next-id.js +165 -0
- package/dist/os/rfc/next-id.js.map +1 -0
- package/dist/os/rfc/probe-batch.d.ts.map +1 -1
- package/dist/os/rfc/probe-batch.js +6 -1
- package/dist/os/rfc/probe-batch.js.map +1 -1
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +36 -8
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +35 -6
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +6 -6
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts +1 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +81 -28
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-origin.d.ts +8 -0
- package/dist/os/rfc/verification-origin.d.ts.map +1 -1
- package/dist/os/rfc/verification-origin.js +47 -0
- package/dist/os/rfc/verification-origin.js.map +1 -1
- package/dist/os/session/handlers/save.d.ts.map +1 -1
- package/dist/os/session/handlers/save.js +31 -7
- package/dist/os/session/handlers/save.js.map +1 -1
- package/dist/os/spec/spec-schema.d.ts +8 -0
- package/dist/os/spec/spec-schema.d.ts.map +1 -1
- package/dist/os/spec/spec-schema.js +1 -0
- package/dist/os/spec/spec-schema.js.map +1 -1
- package/dist/os/spec/spec-status.d.ts +8 -0
- package/dist/os/spec/spec-status.d.ts.map +1 -1
- package/dist/os/spec/spec-status.js +18 -6
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.d.ts.map +1 -1
- package/dist/os/spec/spec-validate.js +62 -15
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/spec/spec.module.d.ts.map +1 -1
- package/dist/os/spec/spec.module.js +13 -5
- package/dist/os/spec/spec.module.js.map +1 -1
- package/dist/os/system/handlers/system-map-validate.d.ts.map +1 -1
- package/dist/os/system/handlers/system-map-validate.js +2 -1
- package/dist/os/system/handlers/system-map-validate.js.map +1 -1
- package/dist/os/system/handlers/system-outbox-scan.d.ts +11 -0
- package/dist/os/system/handlers/system-outbox-scan.d.ts.map +1 -1
- package/dist/os/system/handlers/system-outbox-scan.js +54 -6
- package/dist/os/system/handlers/system-outbox-scan.js.map +1 -1
- package/dist/os/system/handlers/system-task-create.d.ts.map +1 -1
- package/dist/os/system/handlers/system-task-create.js +6 -1
- package/dist/os/system/handlers/system-task-create.js.map +1 -1
- package/dist/os/system/handlers/system-versionset-record.d.ts +14 -0
- package/dist/os/system/handlers/system-versionset-record.d.ts.map +1 -1
- package/dist/os/system/handlers/system-versionset-record.js +246 -6
- package/dist/os/system/handlers/system-versionset-record.js.map +1 -1
- package/dist/os/system/repo.d.ts +1 -1
- package/dist/os/system/repo.d.ts.map +1 -1
- package/dist/os/system/repo.js +53 -3
- package/dist/os/system/repo.js.map +1 -1
- package/dist/os/system/scenario-schemas.d.ts +109 -3
- package/dist/os/system/scenario-schemas.d.ts.map +1 -1
- package/dist/os/system/scenario-schemas.js +66 -10
- package/dist/os/system/scenario-schemas.js.map +1 -1
- package/dist/os/system/system.module.d.ts.map +1 -1
- package/dist/os/system/system.module.js +69 -17
- package/dist/os/system/system.module.js.map +1 -1
- package/dist/os/system/tests/contract-fixtures.d.ts +17 -0
- package/dist/os/system/tests/contract-fixtures.d.ts.map +1 -0
- package/dist/os/system/tests/contract-fixtures.js +109 -0
- package/dist/os/system/tests/contract-fixtures.js.map +1 -0
- package/dist/src/config/forge-config.d.ts +54 -18
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +41 -9
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/conformance/index.d.ts +6 -0
- package/dist/src/conformance/index.d.ts.map +1 -1
- package/dist/src/conformance/index.js +36 -1
- package/dist/src/conformance/index.js.map +1 -1
- package/dist/src/formal/proof-runner.d.ts.map +1 -1
- package/dist/src/formal/proof-runner.js +10 -2
- package/dist/src/formal/proof-runner.js.map +1 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js +3 -1
- package/dist/src/migration-adapters/node-typescript-pnpm/index.js.map +1 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js +3 -1
- package/dist/src/migration-adapters/phaser-pnpm/index.js.map +1 -1
- package/dist/src/onboarding/agents-generate.js +4 -4
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/nested-agents-generate.js +3 -1
- package/dist/src/onboarding/nested-agents-generate.js.map +1 -1
- package/dist/src/onboarding/scaffold-project.js +2 -2
- package/dist/src/onboarding/scaffold-project.js.map +1 -1
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +14 -2
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/onboarding/workspace-discovery.d.ts.map +1 -1
- package/dist/src/onboarding/workspace-discovery.js +3 -1
- package/dist/src/onboarding/workspace-discovery.js.map +1 -1
- package/dist/src/skill-schema.d.ts +3 -0
- package/dist/src/skill-schema.d.ts.map +1 -1
- package/dist/src/skill-schema.js +9 -2
- package/dist/src/skill-schema.js.map +1 -1
- package/dist/src/spec/resolve-spec-source.d.ts +45 -0
- package/dist/src/spec/resolve-spec-source.d.ts.map +1 -0
- package/dist/src/spec/resolve-spec-source.js +153 -0
- package/dist/src/spec/resolve-spec-source.js.map +1 -0
- package/dist/src/utils/command-inventory.d.ts +28 -0
- package/dist/src/utils/command-inventory.d.ts.map +1 -0
- package/dist/src/utils/command-inventory.js +84 -0
- package/dist/src/utils/command-inventory.js.map +1 -0
- package/dist/src/utils/io.d.ts.map +1 -1
- package/dist/src/utils/io.js +6 -1
- package/dist/src/utils/io.js.map +1 -1
- package/dist/src/utils/repo-path.d.ts +10 -0
- package/dist/src/utils/repo-path.d.ts.map +1 -0
- package/dist/src/utils/repo-path.js +52 -0
- package/dist/src/utils/repo-path.js.map +1 -0
- package/dist/src/utils/spawn.d.ts +23 -0
- package/dist/src/utils/spawn.d.ts.map +1 -0
- package/dist/src/utils/spawn.js +83 -0
- package/dist/src/utils/spawn.js.map +1 -0
- package/docs/branch-model.md +1 -1
- package/docs/guides/existing-project.md +1 -1
- package/docs/maintainers/publishing.md +1 -1
- package/docs/reference/cli.md +8 -2
- package/docs/reference/profiles.md +1 -1
- package/os/adr/handlers/list-create.ts +26 -2
- package/os/adr/types.ts +4 -2
- package/os/compass/handlers/compass-audit-handler.ts +6 -1
- package/os/compass/handlers/compass-header-scaffold-handler.ts +12 -11
- package/os/compass/handlers/git-revision.ts +8 -2
- package/os/compass/handlers/summary-record.ts +25 -14
- package/os/compass/handlers/tests/compass-invariant-binding.test.ts +3 -2
- package/os/conformance/conformance.module.ts +21 -4
- package/os/conformance/handlers/conformance-validate.ts +108 -16
- package/os/conformance/handlers/tests/conformance-package-consumer.test.ts +200 -0
- package/os/core/archive-regen.ts +279 -0
- package/os/core/core.module.ts +176 -29
- package/os/core/docs-archive.test.ts +413 -3
- package/os/core/handlers/assets-helpers.ts +8 -3
- package/os/core/handlers/forge-autonomy-validate.ts +3 -1
- package/os/core/handlers/package-health.test.ts +418 -4
- package/os/core/handlers/package-health.ts +629 -7
- package/os/core/handlers/release-prepare.ts +5 -2
- package/os/flow/digest.ts +3 -1
- package/os/flow/dirty-classify.ts +112 -0
- package/os/flow/flow.module.ts +92 -24
- package/os/flow/gate-engine.ts +45 -0
- package/os/flow/git.ts +117 -29
- package/os/flow/handlers/flow-backmerge.ts +14 -4
- package/os/flow/handlers/flow-check.ts +27 -2
- package/os/flow/handlers/flow-cut.ts +97 -46
- package/os/flow/handlers/flow-discard.ts +33 -5
- package/os/flow/handlers/flow-fix.ts +22 -10
- package/os/flow/handlers/flow-hold.ts +20 -7
- package/os/flow/handlers/flow-install.ts +59 -12
- package/os/flow/handlers/flow-integrate.ts +808 -182
- package/os/flow/handlers/flow-open.ts +135 -11
- package/os/flow/handlers/flow-status.ts +45 -13
- package/os/flow/index.ts +3 -1
- package/os/flow/line-version.ts +2 -1
- package/os/flow/locks.ts +56 -14
- package/os/flow/preflight.ts +763 -0
- package/os/flow/publish.ts +200 -5
- package/os/flow/registry.ts +43 -7
- package/os/flow/scripts.ts +23 -7
- package/os/flow/session-checkout.ts +186 -0
- package/os/flow/tests/dirty-classify.test.ts +116 -0
- package/os/flow/tests/fixtures/branch-names.yaml +40 -40
- package/os/flow/tests/flow-discard.test.ts +32 -0
- package/os/flow/tests/flow-guard-parity.test.ts +10 -2
- package/os/flow/tests/flow-install.test.ts +7 -3
- package/os/flow/tests/flow-integrate.gate-report.test.ts +144 -0
- package/os/flow/tests/flow-integrate.preflight.test.ts +561 -0
- package/os/flow/tests/flow-integrate.reattach.test.ts +197 -0
- package/os/flow/tests/flow-integrate.remediation.test.ts +254 -0
- package/os/flow/tests/flow-integrate.test.ts +348 -17
- package/os/flow/tests/flow-open.pending.test.ts +277 -0
- package/os/flow/tests/flow-open.test.ts +52 -9
- package/os/flow/tests/flow-push-publish.test.ts +124 -0
- package/os/flow/tests/flow-status.test.ts +31 -1
- package/os/flow/tests/locks.test.ts +39 -3
- package/os/flow/tests/scripts.test.ts +18 -2
- package/os/flow/tests/state-roots.test.ts +8 -5
- package/os/flow/worktree-path.ts +9 -3
- package/os/formal/handlers/proof-check.test.ts +6 -3
- package/os/instructions/budget.test.ts +31 -0
- package/os/instructions/handlers/budget-validate.ts +13 -4
- package/os/instructions/instructions.module.ts +4 -1
- package/os/mission/open-missions.ts +50 -0
- package/os/queue/decision-ledger.test.ts +18 -0
- package/os/queue/manifest.ts +17 -1
- package/os/rfc/acceptance.ts +30 -10
- package/os/rfc/decision-log.ts +13 -2
- package/os/rfc/frontmatter-io.ts +89 -1
- package/os/rfc/handlers/implement-stamp-deviations.test.ts +83 -0
- package/os/rfc/handlers/implement-stamp-deviations.ts +22 -2
- package/os/rfc/handlers/implement-stamp-stale.test.ts +5 -1
- package/os/rfc/handlers/implement-stamp.ts +16 -3
- package/os/rfc/handlers/index-graph.ts +5 -4
- package/os/rfc/handlers/lifecycle.test.ts +136 -0
- package/os/rfc/handlers/list-create.test.ts +82 -0
- package/os/rfc/handlers/list-create.ts +101 -8
- package/os/rfc/handlers/rfc-evidence-sync.test.ts +504 -0
- package/os/rfc/handlers/rfc-evidence-sync.ts +192 -2
- package/os/rfc/handlers/tests/index-graph.test.ts +2 -1
- package/os/rfc/handlers/validate-rules-rfc1454.test.ts +73 -0
- package/os/rfc/handlers/validate-rules.ts +103 -7
- package/os/rfc/handlers/validate.ts +68 -4
- package/os/rfc/next-id.ts +232 -0
- package/os/rfc/probe-batch.ts +6 -1
- package/os/rfc/rfc.module.ts +41 -8
- package/os/rfc/types.ts +28 -6
- package/os/rfc/verification-emit-freshness.test.ts +5 -1
- package/os/rfc/verification-emit.test.ts +5 -1
- package/os/rfc/verification-evidence.ts +99 -33
- package/os/rfc/verification-origin.ts +59 -0
- package/os/rfc/verification-refresh.test.ts +5 -1
- package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +5 -1
- package/os/session/handlers/save.ts +35 -7
- package/os/session/tests/session-save.test.ts +154 -0
- package/os/spec/spec-schema.ts +3 -0
- package/os/spec/spec-status.ts +22 -6
- package/os/spec/spec-validate.package-source.test.ts +187 -0
- package/os/spec/spec-validate.ts +65 -14
- package/os/spec/spec.module.ts +13 -5
- package/os/system/handlers/system-map-validate.ts +4 -2
- package/os/system/handlers/system-outbox-scan.ts +65 -21
- package/os/system/handlers/system-task-create.ts +6 -1
- package/os/system/handlers/system-versionset-record.ts +301 -16
- package/os/system/repo.ts +59 -18
- package/os/system/scenario-schemas.ts +91 -12
- package/os/system/system.module.ts +70 -17
- package/os/system/tests/contract-fixtures.ts +139 -0
- package/os/system/tests/scenario-pin-drift-check.test.ts +114 -0
- package/os/system/tests/scenario-validator-check.test.ts +96 -0
- package/os/system/tests/system-task-dispatch.test.ts +4 -1
- package/os/system/tests/system-versionset.test.ts +7 -3
- package/os/system/tests/version-set-v2.test.ts +78 -0
- package/package.json +9 -1
- package/profiles/forge-shell.yaml +1 -2
- package/profiles/knowledge.yaml +1 -1
- package/profiles/system.yaml +2 -2
- package/profiles/typescript.yaml +0 -1
- package/skills/fo/fo-doctor/SKILL.md +151 -0
- package/skills/fo/fo-handoff/SKILL.md +22 -0
- package/skills/fo/fo-idea-create-rfc/acceptance-criteria-standard.md +2 -1
- package/skills/fo/fo-idea-implement/SKILL.md +5 -2
- package/skills/fo/fo-idea-plan/SKILL.md +5 -5
- package/skills/fo/fo-session-retro/SKILL.md +37 -11
- package/skills/fo/fo-spec-ingest/SKILL.md +8 -0
- package/skills/fo/fo-system-dispatch/SKILL.md +1 -0
- package/skills/meta/skill-create/SKILL.md +2 -1
- package/src/bin-entry.test.ts +3 -1
- package/src/config/forge-config.ts +57 -13
- package/src/conformance/index.ts +46 -1
- package/src/formal/proof-runner.ts +10 -2
- package/src/migration-adapters/node-typescript-pnpm/index.ts +3 -1
- package/src/migration-adapters/phaser-pnpm/index.ts +3 -1
- package/src/onboarding/agents-generate.ts +4 -4
- package/src/onboarding/nested-agents-generate.ts +3 -1
- package/src/onboarding/scaffold-project.ts +2 -2
- package/src/onboarding/upgrade.ts +13 -2
- package/src/onboarding/workspace-discovery.ts +3 -1
- package/src/pipeline-status.test.ts +1 -1
- package/src/skill-schema.ts +9 -2
- package/src/spec/resolve-spec-source.ts +184 -0
- package/src/tests/acceptance-probe-kinds.test.ts +3 -1
- package/src/tests/agents-generate-domain.test.ts +3 -2
- package/src/tests/agents-generate.test.ts +2 -1
- package/src/tests/create-flow.test.ts +3 -1
- package/src/tests/create.test.ts +12 -2
- package/src/tests/editable-generated-region.test.ts +2 -2
- package/src/tests/fixtures/agents-generate-business-before.txt +2 -0
- package/src/tests/implement-stamp.test.ts +5 -2
- package/src/tests/profile-flow-hooks.test.ts +15 -0
- package/src/tests/rfc-implement-stamp-governance.test.ts +6 -2
- package/src/tests/rfc-verification-verdict-ingest.test.ts +5 -1
- package/src/tests/scaffold-project.test.ts +3 -1
- package/src/tests/upgrade.test.ts +79 -3
- package/src/tests/workspace-discovery.test.ts +4 -3
- package/src/utils/command-inventory.ts +105 -0
- package/src/utils/io.ts +6 -1
- package/src/utils/repo-path.ts +49 -0
- package/src/utils/spawn.ts +88 -0
- package/src/tests/rfc-evidence-sync.test.ts +0 -369
- package/src/tests/skill-agents-sync.test.ts +0 -192
|
@@ -14,6 +14,10 @@ invocation attests "all generated artifacts + RFC evidence are current".
|
|
|
14
14
|
<KEY_DECISIONS>
|
|
15
15
|
<item>Step order is contract: the ecosystem manifest hashes the other artifacts, so ecosystem.manifest.generate runs last among the manifest steps.</item>
|
|
16
16
|
<item>EVIDENCE_SYNC_STEPS is the canonical regen list</item>
|
|
17
|
+
<item>RFC-1516: the committed envelope is read via `git show HEAD:<path>`, never the worktree file — an uncommitted hand-edit can never become reusable input; every gate below green+matching+in-window falls back to full re-execution with its reason journalized.</item>
|
|
18
|
+
<item>RFC-1516: reuse is evaluated in emit (not in the sync orchestrator) so the direct `rfc.verification.emit` path, the sync chain, and the stamp's in-process emits share one decision; sync only forwards the escape flag and surfaces the verdict.</item>
|
|
19
|
+
<item>RFC-1516 review-r1: freshness binds to `resultsFrom ?? emittedAt`, not `emittedAt` alone — an envelope that replays records stamps the original execution's anchor, so chained emit+commit cycles cannot extend result age past the window.</item>
|
|
20
|
+
<item>RFC-1516 review-r1: a probes-count mismatch is `malformed` only after the acceptanceHash gate — a legitimately changed list reports `acceptance-changed`; a matching-hash envelope with a short or misshapen probes array is crafted bytes and degrades to full re-execution, never a crash or partial reuse.</item>
|
|
17
21
|
</KEY_DECISIONS>
|
|
18
22
|
<CHANGE_SUMMARY>
|
|
19
23
|
<item>RFC-1306: initial — EVIDENCE_SYNC_STEPS chain + runRfcEvidenceSync via the ctx.invoke port; EVIDENCE-SYNC-01 fail-closed without a kernel host, EVIDENCE-SYNC-02 propagates a failed step's diagnostics verbatim; review-r1: try/catch maps thrown invokes into EVIDENCE-SYNC-02, dry-run exposes `planned` in data.</item>
|
|
@@ -26,6 +30,10 @@ import type {
|
|
|
26
30
|
ForgeCommandResult,
|
|
27
31
|
ForgeRuntimeContext,
|
|
28
32
|
} from "../../../src/types.ts";
|
|
33
|
+
import { execFile } from "../../../src/utils/sync-fs.ts";
|
|
34
|
+
import { parse as yamlParse } from "yaml";
|
|
35
|
+
import { gitEnvForCwd } from "../verification-origin.ts";
|
|
36
|
+
import type { VerificationEvidence } from "../types.ts";
|
|
29
37
|
|
|
30
38
|
/**
|
|
31
39
|
* The canonical RFC-evidence regen order (RFC-1306). The emit step is
|
|
@@ -42,6 +50,127 @@ export const EVIDENCE_SYNC_STEPS: readonly string[] = [
|
|
|
42
50
|
|
|
43
51
|
export const EVIDENCE_SYNC_EMIT_STEP = "rfc.verification.emit";
|
|
44
52
|
|
|
53
|
+
/** RFC-1516: the evidence-freshness window — a committed green envelope
|
|
54
|
+
* younger than this may replay its heavy-probe results instead of
|
|
55
|
+
* re-executing them. 4h covers every realistic stamp-retry session while
|
|
56
|
+
* bounding staleness. */
|
|
57
|
+
export const EVIDENCE_REUSE_WINDOW_MS = 14400000;
|
|
58
|
+
|
|
59
|
+
export type EvidenceReuseReason =
|
|
60
|
+
| "envelope-reused"
|
|
61
|
+
| "absent"
|
|
62
|
+
| "malformed"
|
|
63
|
+
| "not-green"
|
|
64
|
+
| "acceptance-changed"
|
|
65
|
+
| "expired"
|
|
66
|
+
| "disabled";
|
|
67
|
+
|
|
68
|
+
export interface EvidenceReuseVerdict {
|
|
69
|
+
reusable: boolean;
|
|
70
|
+
reason: EvidenceReuseReason;
|
|
71
|
+
/** The reused envelope's `emittedAt` when reusable — provenance, not a
|
|
72
|
+
* claim the probes just ran. */
|
|
73
|
+
reusedFrom?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Reuse is strictly gated — anything short of a well-formed, green,
|
|
77
|
+
* acceptance-matching, in-window envelope falls back to full re-execution.
|
|
78
|
+
* `malformed` covers every unreadable/underspecified shape: unparsable
|
|
79
|
+
* YAML, a non-object body, missing contract fields, bad record elements —
|
|
80
|
+
* and a probes-array length that contradicts a matching acceptanceHash
|
|
81
|
+
* (a crafted envelope; a legitimately different list reports
|
|
82
|
+
* `acceptance-changed` first). */
|
|
83
|
+
export function evaluateEvidenceReuse(opts: {
|
|
84
|
+
committed: VerificationEvidence | null;
|
|
85
|
+
/** true when bytes existed but did not parse to the envelope contract. */
|
|
86
|
+
malformed?: boolean;
|
|
87
|
+
/** committed probes[].length ≠ the live acceptance list length. */
|
|
88
|
+
probeCountMismatch?: boolean;
|
|
89
|
+
acceptanceHashHex: string;
|
|
90
|
+
disabled: boolean;
|
|
91
|
+
now?: number;
|
|
92
|
+
}): EvidenceReuseVerdict {
|
|
93
|
+
if (opts.disabled) return { reusable: false, reason: "disabled" };
|
|
94
|
+
if (opts.malformed) return { reusable: false, reason: "malformed" };
|
|
95
|
+
const env = opts.committed;
|
|
96
|
+
if (!env) return { reusable: false, reason: "absent" };
|
|
97
|
+
if (env.overall !== "pass") return { reusable: false, reason: "not-green" };
|
|
98
|
+
if (env.acceptanceHash !== opts.acceptanceHashHex) {
|
|
99
|
+
return { reusable: false, reason: "acceptance-changed" };
|
|
100
|
+
}
|
|
101
|
+
if (opts.probeCountMismatch) return { reusable: false, reason: "malformed" };
|
|
102
|
+
// Freshness binds to the oldest replayed result, not the last emission:
|
|
103
|
+
// `resultsFrom` is stamped when an envelope replays committed records, so
|
|
104
|
+
// chained emit+commit cycles cannot extend result age past the window.
|
|
105
|
+
const anchor = typeof env.resultsFrom === "string" ? env.resultsFrom : env.emittedAt;
|
|
106
|
+
const anchorMs = Date.parse(anchor ?? "");
|
|
107
|
+
const now = opts.now ?? Date.now();
|
|
108
|
+
// Future timestamps are outside the window too (60s skew tolerance) —
|
|
109
|
+
// a negative age must never read as "fresh".
|
|
110
|
+
if (
|
|
111
|
+
!Number.isFinite(anchorMs) ||
|
|
112
|
+
now - anchorMs > EVIDENCE_REUSE_WINDOW_MS ||
|
|
113
|
+
anchorMs - now > 60_000
|
|
114
|
+
) {
|
|
115
|
+
return { reusable: false, reason: "expired" };
|
|
116
|
+
}
|
|
117
|
+
return { reusable: true, reason: "envelope-reused", reusedFrom: env.emittedAt };
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** The committed envelope — read from HEAD bytes (`git show`), never the
|
|
121
|
+
* worktree file, so an uncommitted hand-edit can never become reusable
|
|
122
|
+
* input. Returns {envelope} on a contract-shaped parse, {malformed} on
|
|
123
|
+
* bytes that exist but don't satisfy it, {} when nothing is committed. */
|
|
124
|
+
export async function readCommittedEnvelope(
|
|
125
|
+
workspaceRoot: string,
|
|
126
|
+
relPath: string,
|
|
127
|
+
expectedProbeCount?: number,
|
|
128
|
+
): Promise<{
|
|
129
|
+
envelope?: VerificationEvidence;
|
|
130
|
+
malformed?: boolean;
|
|
131
|
+
probeCountMismatch?: boolean;
|
|
132
|
+
}> {
|
|
133
|
+
const rel = relPath.replace(/\\/g, "/");
|
|
134
|
+
const stdout = await new Promise<string>((resolve) => {
|
|
135
|
+
execFile(
|
|
136
|
+
"git",
|
|
137
|
+
["show", `HEAD:${rel}`],
|
|
138
|
+
{ cwd: workspaceRoot, timeout: 5000, env: gitEnvForCwd() },
|
|
139
|
+
(err, out) => {
|
|
140
|
+
resolve(err ? "" : out);
|
|
141
|
+
},
|
|
142
|
+
);
|
|
143
|
+
});
|
|
144
|
+
if (stdout.trim().length === 0) return {};
|
|
145
|
+
let parsed: unknown;
|
|
146
|
+
try {
|
|
147
|
+
parsed = yamlParse(stdout);
|
|
148
|
+
} catch {
|
|
149
|
+
return { malformed: true };
|
|
150
|
+
}
|
|
151
|
+
if (typeof parsed !== "object" || parsed === null) return { malformed: true };
|
|
152
|
+
const env = parsed as Partial<VerificationEvidence>;
|
|
153
|
+
if (
|
|
154
|
+
typeof env.rfcId !== "string" ||
|
|
155
|
+
typeof env.emittedAt !== "string" ||
|
|
156
|
+
typeof env.acceptanceHash !== "string" ||
|
|
157
|
+
(env.overall !== "pass" && env.overall !== "fail") ||
|
|
158
|
+
!Array.isArray(env.probes) ||
|
|
159
|
+
env.probes.some(
|
|
160
|
+
(r) => r === null || typeof r !== "object" || typeof r.ok !== "boolean",
|
|
161
|
+
) ||
|
|
162
|
+
(env.resultsFrom !== undefined && typeof env.resultsFrom !== "string")
|
|
163
|
+
) {
|
|
164
|
+
return { malformed: true };
|
|
165
|
+
}
|
|
166
|
+
// A length mismatch is NOT malformed on its own — an acceptance-changed
|
|
167
|
+
// envelope legitimately describes a different-sized list. The verdict
|
|
168
|
+
// classifies it as malformed only when the hash still matches (crafted).
|
|
169
|
+
const probeCountMismatch =
|
|
170
|
+
expectedProbeCount !== undefined && env.probes.length !== expectedProbeCount;
|
|
171
|
+
return { envelope: env as VerificationEvidence, probeCountMismatch };
|
|
172
|
+
}
|
|
173
|
+
|
|
45
174
|
export interface RfcEvidenceSyncStepResult {
|
|
46
175
|
step: string;
|
|
47
176
|
flags?: Record<string, unknown>;
|
|
@@ -65,6 +194,14 @@ export interface RfcEvidenceSyncResult {
|
|
|
65
194
|
failedStep?: string;
|
|
66
195
|
/** Dry-run only — the ordered step list that would execute. */
|
|
67
196
|
planned?: Array<{ step: string; flags?: Record<string, string> }>;
|
|
197
|
+
/** RFC-1516: the emit step's freshness-window verdict — surfaced verbatim
|
|
198
|
+
* so a stamp-sync log shows whether heavy probes re-executed or the
|
|
199
|
+
* committed envelope replayed. */
|
|
200
|
+
reuse?: EvidenceReuseVerdict;
|
|
201
|
+
/** Criteria whose run/test/page/proof results carried over. */
|
|
202
|
+
heavyProbesReused?: string[];
|
|
203
|
+
/** Criteria re-resolved against the live tree. */
|
|
204
|
+
cheapProbesReRun?: string[];
|
|
68
205
|
}
|
|
69
206
|
|
|
70
207
|
interface SyncReport {
|
|
@@ -103,10 +240,23 @@ export async function runRfcEvidenceSync(
|
|
|
103
240
|
const rfcId = input.flags["id"];
|
|
104
241
|
const rfcIdStr = typeof rfcId === "string" && rfcId !== "" ? rfcId : undefined;
|
|
105
242
|
const isDryRun = context.dryRun || input.flags["dry-run"] === true;
|
|
243
|
+
// RFC-1516: the escape flag forwards verbatim to the emit step — every
|
|
244
|
+
// probe then re-executes regardless of envelope freshness.
|
|
245
|
+
const noEvidenceReuse = input.flags["no-evidence-reuse"] === true;
|
|
106
246
|
|
|
107
247
|
const plan: Array<{ step: string; flags?: Record<string, string> }> = [
|
|
108
248
|
...EVIDENCE_SYNC_STEPS.map((step) => ({ step })),
|
|
109
|
-
...(rfcIdStr
|
|
249
|
+
...(rfcIdStr
|
|
250
|
+
? [
|
|
251
|
+
{
|
|
252
|
+
step: EVIDENCE_SYNC_EMIT_STEP,
|
|
253
|
+
flags: {
|
|
254
|
+
id: rfcIdStr,
|
|
255
|
+
...(noEvidenceReuse ? { "no-evidence-reuse": "true" } : {}),
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
]
|
|
259
|
+
: []),
|
|
110
260
|
];
|
|
111
261
|
|
|
112
262
|
if (isDryRun) {
|
|
@@ -151,6 +301,7 @@ export async function runRfcEvidenceSync(
|
|
|
151
301
|
}
|
|
152
302
|
|
|
153
303
|
const steps: RfcEvidenceSyncStepResult[] = [];
|
|
304
|
+
let emitReport: Awaited<ReturnType<typeof invoke>> | null = null;
|
|
154
305
|
for (const planned of plan) {
|
|
155
306
|
// A throwing invoke (unresolvable child, host/module failure) still maps
|
|
156
307
|
// into the EVIDENCE-SYNC-02 contract — fail closed, never a raw exception.
|
|
@@ -182,11 +333,25 @@ export async function runRfcEvidenceSync(
|
|
|
182
333
|
...(report.summary ? { summary: report.summary } : {}),
|
|
183
334
|
};
|
|
184
335
|
steps.push(stepResult);
|
|
336
|
+
if (planned.step === EVIDENCE_SYNC_EMIT_STEP) emitReport = report;
|
|
185
337
|
if (outputFormat === "pretty") {
|
|
186
338
|
const changed = filesModified.length;
|
|
187
339
|
logger.info(
|
|
188
340
|
` ${planned.step}: ${stepResult.status}${changed > 0 ? ` (${changed} file${changed === 1 ? "" : "s"} changed)` : ""}`,
|
|
189
341
|
);
|
|
342
|
+
// RFC-1516: a one-line note keeps replayed probes visible — an old
|
|
343
|
+
// pass must never look like a fresh execution in pretty output.
|
|
344
|
+
if (planned.step === EVIDENCE_SYNC_EMIT_STEP && report.exitCode === 0) {
|
|
345
|
+
const emitted = (report.data as { emitted?: Array<{
|
|
346
|
+
reuse?: { reusable?: boolean; reusedFrom?: string };
|
|
347
|
+
heavyProbesReused?: string[];
|
|
348
|
+
}> } | null)?.emitted?.[0];
|
|
349
|
+
if (emitted?.reuse?.reusable === true) {
|
|
350
|
+
logger.info(
|
|
351
|
+
` ${planned.step}: envelope-reused — ${emitted.heavyProbesReused?.length ?? 0} heavy probe(s) replayed from ${emitted.reuse.reusedFrom}`,
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
190
355
|
}
|
|
191
356
|
|
|
192
357
|
// EVIDENCE-SYNC-02: stop on the first failing step — a partial sync is
|
|
@@ -212,10 +377,35 @@ export async function runRfcEvidenceSync(
|
|
|
212
377
|
}
|
|
213
378
|
|
|
214
379
|
const changedFiles = [...new Set(steps.flatMap((s) => s.filesModified))];
|
|
380
|
+
// RFC-1516: surface the emit step's freshness-window verdict verbatim —
|
|
381
|
+
// a stamp-sync log shows whether heavy probes re-executed or the
|
|
382
|
+
// committed envelope replayed, never silently.
|
|
383
|
+
const emitStep = steps.find((s) => s.step === EVIDENCE_SYNC_EMIT_STEP);
|
|
384
|
+
const emitData =
|
|
385
|
+
emitStep !== undefined && emitReport !== null
|
|
386
|
+
? (emitReport.data as {
|
|
387
|
+
emitted?: Array<{
|
|
388
|
+
reuse?: EvidenceReuseVerdict;
|
|
389
|
+
heavyProbesReused?: string[];
|
|
390
|
+
cheapProbesReRun?: string[];
|
|
391
|
+
}>;
|
|
392
|
+
} | null)
|
|
393
|
+
: null;
|
|
394
|
+
const emittedEntry = emitData?.emitted?.[0];
|
|
215
395
|
return syncResult(
|
|
216
396
|
"pass",
|
|
217
397
|
[],
|
|
218
|
-
{
|
|
398
|
+
{
|
|
399
|
+
steps,
|
|
400
|
+
...(rfcIdStr ? { rfcId: rfcIdStr } : {}),
|
|
401
|
+
...(emittedEntry?.reuse ? { reuse: emittedEntry.reuse } : {}),
|
|
402
|
+
...(emittedEntry?.heavyProbesReused?.length
|
|
403
|
+
? { heavyProbesReused: emittedEntry.heavyProbesReused }
|
|
404
|
+
: {}),
|
|
405
|
+
...(emittedEntry?.cheapProbesReRun?.length
|
|
406
|
+
? { cheapProbesReRun: emittedEntry.cheapProbesReRun }
|
|
407
|
+
: {}),
|
|
408
|
+
},
|
|
219
409
|
`rfc.evidence.sync: ${steps.length} steps clean, ${changedFiles.length} file${changedFiles.length === 1 ? "" : "s"} changed`,
|
|
220
410
|
);
|
|
221
411
|
}
|
|
@@ -106,7 +106,8 @@ describe("rfc.index.generate — RFC-1364 concurrent-write robustness", () => {
|
|
|
106
106
|
const result = await runRfcIndexGenerate(makeInput({ write: true }), makeContext(tmpDir));
|
|
107
107
|
const data = result.data as { status: string; written?: string; count: number };
|
|
108
108
|
expect(data.status).toBe("ok");
|
|
109
|
-
|
|
109
|
+
// `written` is a repo-relative logical path — forward slashes on all platforms.
|
|
110
|
+
expect(data.written).toBe("docs/rfcs/index.yaml");
|
|
110
111
|
expect(data.count).toBe(2);
|
|
111
112
|
const index = await fs.readFile(path.join(rfcDir, "index.yaml"), "utf-8");
|
|
112
113
|
expect(index).toContain("RFC-0002");
|
|
@@ -15,6 +15,7 @@ repo because the committed-report index reads `git ls-tree`/`git show`.
|
|
|
15
15
|
<item>RFC-1454: V-49 deviation-provenance validation tests.</item>
|
|
16
16
|
<item>RFC-1454: review deviations recorded in the RFC — IMP-15 gate, V-49 provenance, skill contract</item>
|
|
17
17
|
<item>RFC-1485: sweep compass headers — forge-os-rfc</item>
|
|
18
|
+
<item>RFC-1513: run-scoped committed-review index evidence (AC-1)</item>
|
|
18
19
|
</CHANGE_SUMMARY>
|
|
19
20
|
*/
|
|
20
21
|
|
|
@@ -24,6 +25,7 @@ import { mkdtemp, mkdir, writeFile } from "node:fs/promises";
|
|
|
24
25
|
import { join } from "node:path";
|
|
25
26
|
import { tmpdir } from "node:os";
|
|
26
27
|
import { validateSingleRfc, type AddViolationFn } from "./validate-rules.ts";
|
|
28
|
+
import type { CommittedReview } from "./implement-stamp-deviations.ts";
|
|
27
29
|
import type { ParsedRfc } from "../frontmatter-io.ts";
|
|
28
30
|
|
|
29
31
|
interface Seen {
|
|
@@ -135,3 +137,74 @@ describe("V-49 — deviations provenance resolves to committed reviews (AC-4)",
|
|
|
135
137
|
expect(seen.filter((v) => v.rule === "V-49")).toHaveLength(0);
|
|
136
138
|
});
|
|
137
139
|
});
|
|
140
|
+
|
|
141
|
+
describe("RFC-1513 — run-scoped committed-review index (AC-1)", () => {
|
|
142
|
+
const runValidateWithIndex = async (
|
|
143
|
+
workspaceRoot: string,
|
|
144
|
+
body: string,
|
|
145
|
+
committedReviews: () => Promise<CommittedReview[]>,
|
|
146
|
+
): Promise<Seen[]> => {
|
|
147
|
+
const seen: Seen[] = [];
|
|
148
|
+
const add: AddViolationFn = (_id, _file, rule, msg, severity) =>
|
|
149
|
+
void seen.push({ rule, severity, message: msg });
|
|
150
|
+
const parsed = makeParsed(body);
|
|
151
|
+
await validateSingleRfc(
|
|
152
|
+
"rfc-9999-test.md",
|
|
153
|
+
parsed,
|
|
154
|
+
new Map(),
|
|
155
|
+
new Map(),
|
|
156
|
+
new Set(),
|
|
157
|
+
new Set(),
|
|
158
|
+
new Set(Object.keys(parsed.frontmatter)),
|
|
159
|
+
workspaceRoot,
|
|
160
|
+
add,
|
|
161
|
+
undefined,
|
|
162
|
+
undefined,
|
|
163
|
+
committedReviews,
|
|
164
|
+
);
|
|
165
|
+
return seen;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
test("the shared getter builds the index at most once across deviation-carrying RFCs", async () => {
|
|
169
|
+
// The injected index names a review the real repo does not carry —
|
|
170
|
+
// a per-RFC collection would report dangling provenance, so a clean
|
|
171
|
+
// V-49 proves the getter (not execGitLog) answered. `builds` counts
|
|
172
|
+
// index constructions behind the memoized promise.
|
|
173
|
+
const dir = await makeWorkspace({
|
|
174
|
+
"docs/reviews/code/r1.md": REVIEW("REVIEW-1"),
|
|
175
|
+
});
|
|
176
|
+
let builds = 0;
|
|
177
|
+
let promise: Promise<CommittedReview[]> | undefined;
|
|
178
|
+
const committedReviews = () => {
|
|
179
|
+
promise ??= (async () => {
|
|
180
|
+
builds++;
|
|
181
|
+
return [
|
|
182
|
+
{
|
|
183
|
+
path: "docs/reviews/code/x.md",
|
|
184
|
+
reviewId: "REVIEW-IDX",
|
|
185
|
+
deviations: [],
|
|
186
|
+
},
|
|
187
|
+
];
|
|
188
|
+
})();
|
|
189
|
+
return promise;
|
|
190
|
+
};
|
|
191
|
+
const body = DEVIATIONS("- DEV-1 (review REVIEW-IDX): changed.");
|
|
192
|
+
const first = await runValidateWithIndex(dir, body, committedReviews);
|
|
193
|
+
const second = await runValidateWithIndex(dir, body, committedReviews);
|
|
194
|
+
expect(builds, "one index build serves every deviation-carrying RFC").toBe(1);
|
|
195
|
+
expect(first.filter((v) => v.rule === "V-49")).toHaveLength(0);
|
|
196
|
+
expect(second.filter((v) => v.rule === "V-49")).toHaveLength(0);
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
test("the getter stays un-consumed for an RFC without ## Deviations entries", async () => {
|
|
200
|
+
const dir = await makeWorkspace({});
|
|
201
|
+
let invoked = 0;
|
|
202
|
+
const committedReviews = async () => {
|
|
203
|
+
invoked++;
|
|
204
|
+
return [];
|
|
205
|
+
};
|
|
206
|
+
const seen = await runValidateWithIndex(dir, "# RFC-9999: Test RFC\n\nplain body\n", committedReviews);
|
|
207
|
+
expect(invoked).toBe(0);
|
|
208
|
+
expect(seen.filter((v) => v.rule === "V-49")).toHaveLength(0);
|
|
209
|
+
});
|
|
210
|
+
});
|
|
@@ -6,14 +6,21 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-1453: executed outcome probes, IMP-14 surface gate, outcome.serve + V-47/V-48</item>
|
|
10
9
|
<item>RFC-1455: fixed inputs bound to outcome probes — V-50/V-51 + skills</item>
|
|
10
|
+
<item>RFC-1534: V-PROBE-META-01 metachar lint — warning on unescaped parens and `**` + slash glob shapes in file-contains/test probe patterns at authoring statuses; `probe-meta: intentional` comment suppresses per-pattern via raw frontmatterSource scan.</item>
|
|
11
11
|
<item>RFC-1454: review deviations recorded in the RFC — IMP-15 gate, V-49 provenance, skill contract</item>
|
|
12
12
|
<item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
|
|
13
13
|
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
14
14
|
|
|
15
15
|
runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
|
|
16
|
-
<
|
|
16
|
+
<item>RFC-1513: steps 2-4 — batched committed-review reads + run-scoped index
|
|
17
|
+
|
|
18
|
+
OriginGit gains optional showMany backed by one git cat-file --batch
|
|
19
|
+
process (per-spec null on missing objects, wholesale null on spawn or
|
|
20
|
+
framing failure). collectCommittedReviews prefers it and keeps the
|
|
21
|
+
sequential show loop for stubs. rfc.validate memoizes the index once
|
|
22
|
+
per run and V-49 consumes it — identical diagnostics, one batched read.</item>
|
|
23
|
+
<history>RFC-0303, RFC-0722, RFC-0755, RFC-0795, RFC-0997, RFC-1006, RFC-1097, RFC-1271, RFC-1322, RFC-1330, RFC-1334, RFC-1336, RFC-1391, RFC-1453</history>
|
|
17
24
|
</CHANGE_SUMMARY>
|
|
18
25
|
*/
|
|
19
26
|
|
|
@@ -60,7 +67,11 @@ import { isPresenceProbe } from "../verification-origin.ts";
|
|
|
60
67
|
import { loadForgeConfig } from "../../../src/config/forge-config.ts";
|
|
61
68
|
import { runProbeMatchesOutcomeBuild } from "./implement-stamp-outcome.ts";
|
|
62
69
|
import { evaluateFixedInputs } from "./fixed-inputs.ts";
|
|
63
|
-
import {
|
|
70
|
+
import {
|
|
71
|
+
collectCommittedReviews,
|
|
72
|
+
parseDeviationsSection,
|
|
73
|
+
type CommittedReview,
|
|
74
|
+
} from "./implement-stamp-deviations.ts";
|
|
64
75
|
import { DNA_DOCS, AP_DOCS } from "./shared.ts";
|
|
65
76
|
|
|
66
77
|
// Ambient default for helper fns without a context param — handlers override
|
|
@@ -522,6 +533,69 @@ export function collectMarkers(body: string, status: string, createdAt: string):
|
|
|
522
533
|
return markers;
|
|
523
534
|
}
|
|
524
535
|
|
|
536
|
+
// ─── RFC-1534: probe-pattern metachar lint (V-PROBE-META-01) ────────────────
|
|
537
|
+
|
|
538
|
+
export interface ProbeMetaHit {
|
|
539
|
+
criterion: string;
|
|
540
|
+
probe: "file-contains" | "test";
|
|
541
|
+
pattern: string;
|
|
542
|
+
chars: string[];
|
|
543
|
+
suggestion: string;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
const PROBE_META_MARKER = "probe-meta: intentional";
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Scans file-contains/test probe patterns for regexp-trap characters —
|
|
550
|
+
* patterns execute via `new RegExp(...)`, so an unescaped `(` or `)` groups
|
|
551
|
+
* instead of matching literally and a `**` + slash glob shape is a
|
|
552
|
+
* nested-quantifier error. A `# <!-- probe-meta: intentional -->` comment on the `pattern:` line
|
|
553
|
+
* (or the line directly above it) in the frontmatter suppresses the warning
|
|
554
|
+
* for that pattern only; YAML drops comments at parse time, so the marker is
|
|
555
|
+
* located in the raw frontmatter source.
|
|
556
|
+
*/
|
|
557
|
+
export function collectProbeMetacharHits(
|
|
558
|
+
acceptance: unknown,
|
|
559
|
+
frontmatterSource: string,
|
|
560
|
+
): ProbeMetaHit[] {
|
|
561
|
+
const probes = Array.isArray(acceptance) ? (acceptance as AcceptanceProbe[]) : [];
|
|
562
|
+
const fmLines = frontmatterSource.split("\n");
|
|
563
|
+
const suppressed = (field: string, value: string): boolean => {
|
|
564
|
+
for (let i = 0; i < fmLines.length; i++) {
|
|
565
|
+
const line = fmLines[i]!;
|
|
566
|
+
if (!line.includes(`${field}:`) || !line.includes(value)) continue;
|
|
567
|
+
return (
|
|
568
|
+
line.includes(PROBE_META_MARKER) || (fmLines[i - 1] ?? "").includes(PROBE_META_MARKER)
|
|
569
|
+
);
|
|
570
|
+
}
|
|
571
|
+
return false;
|
|
572
|
+
};
|
|
573
|
+
const hits: ProbeMetaHit[] = [];
|
|
574
|
+
for (const probe of probes) {
|
|
575
|
+
const kind = probe.probe;
|
|
576
|
+
if (kind !== "file-contains" && kind !== "test") continue;
|
|
577
|
+
// file-contains runs `new RegExp(pattern)`; test passes testName to
|
|
578
|
+
// `vitest -t` — a regexp filter on both paths.
|
|
579
|
+
const field = kind === "test" ? "testName" : "pattern";
|
|
580
|
+
const raw = (probe as unknown as Record<string, unknown>)[field];
|
|
581
|
+
const pattern = typeof raw === "string" ? raw : "";
|
|
582
|
+
if (!pattern) continue;
|
|
583
|
+
const chars: string[] = [];
|
|
584
|
+
if (/(^|[^\\])\(/.test(pattern)) chars.push("unescaped `(`");
|
|
585
|
+
if (/(^|[^\\])\)/.test(pattern)) chars.push("unescaped `)`");
|
|
586
|
+
if (pattern.includes("**/")) chars.push("`**/` glob shape");
|
|
587
|
+
if (chars.length === 0 || suppressed(field, pattern)) continue;
|
|
588
|
+
hits.push({
|
|
589
|
+
criterion: typeof probe.criterion === "string" ? probe.criterion : "?",
|
|
590
|
+
probe: kind,
|
|
591
|
+
pattern,
|
|
592
|
+
chars,
|
|
593
|
+
suggestion: pattern.replace(/\*\*\//g, "(?:.*/)?").replace(/([()])/g, "\\$1"),
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
return hits;
|
|
597
|
+
}
|
|
598
|
+
|
|
525
599
|
export async function validateSingleRfc(
|
|
526
600
|
fileName: string,
|
|
527
601
|
parsed: ParsedRfc,
|
|
@@ -535,6 +609,8 @@ export async function validateSingleRfc(
|
|
|
535
609
|
seenFilenameNumbers?: Map<number, string>,
|
|
536
610
|
/** RFC-1467: memoized decision-log getter shared across drafts (V-52). */
|
|
537
611
|
decisionLog?: () => Promise<DecisionLogEntry[]>,
|
|
612
|
+
/** RFC-1513: memoized committed-review index shared across RFCs (V-49). */
|
|
613
|
+
committedReviews?: () => Promise<CommittedReview[]>,
|
|
538
614
|
): Promise<Marker[]> {
|
|
539
615
|
const fm = parsed.frontmatter;
|
|
540
616
|
const body = parsed.body;
|
|
@@ -917,6 +993,24 @@ export async function validateSingleRfc(
|
|
|
917
993
|
}
|
|
918
994
|
}
|
|
919
995
|
|
|
996
|
+
// V-PROBE-META-01 (RFC-1534): regexp-trap metachar lint — warning at
|
|
997
|
+
// authoring statuses (draft/reviewing/accepted), never a blocking error;
|
|
998
|
+
// terminal statuses are archival and stay silent.
|
|
999
|
+
if (status === "draft" || status === "reviewing" || status === "accepted") {
|
|
1000
|
+
for (const hit of collectProbeMetacharHits(
|
|
1001
|
+
fm["acceptance"],
|
|
1002
|
+
parsed.frontmatterSource ?? "",
|
|
1003
|
+
)) {
|
|
1004
|
+
addViolation(
|
|
1005
|
+
rfcId,
|
|
1006
|
+
relFile,
|
|
1007
|
+
"V-PROBE-META-01",
|
|
1008
|
+
`${hit.criterion} ${hit.probe} pattern "${hit.pattern}" carries ${hit.chars.join(", ")} — probe patterns execute via new RegExp, so these characters group/glob instead of matching literally. Escape or rewrite (e.g. "${hit.suggestion}"); an intentional regexp takes a # <!-- probe-meta: intentional --> comment on the pattern line or the line above.`,
|
|
1009
|
+
"warning",
|
|
1010
|
+
);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
|
|
920
1014
|
// V-38..V-42: criteria content rules (RFC-1006, post-cutoff only)
|
|
921
1015
|
const isCriteriaPostCutoff = createdAt >= RFC_CRITERIA_CONTENT_CUTOFF && !isArchived;
|
|
922
1016
|
if (isCriteriaPostCutoff) {
|
|
@@ -1191,10 +1285,12 @@ export async function validateSingleRfc(
|
|
|
1191
1285
|
} catch {
|
|
1192
1286
|
// forge.yaml unreadable → no committed-report index → entries dangle.
|
|
1193
1287
|
}
|
|
1194
|
-
const reviews =
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1288
|
+
const reviews = committedReviews
|
|
1289
|
+
? await committedReviews()
|
|
1290
|
+
: await collectCommittedReviews(
|
|
1291
|
+
{ run: (args) => execGitLog(workspaceRoot, args) },
|
|
1292
|
+
reviewsDir,
|
|
1293
|
+
);
|
|
1198
1294
|
const known = new Set(reviews.map((r) => r.reviewId));
|
|
1199
1295
|
for (const entry of entries) {
|
|
1200
1296
|
if (!known.has(entry.reviewId)) {
|
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
10
|
-
|
|
11
|
-
Mechanical v1 to v2 header migration across the workspace: 942 files rewritten — CHANGE_SUMMARY windows collapsed into history, forbidden v1 blocks stripped, KEY_DECISIONS seeded from @ai-invariant comments (5 files) or TODO placeholders (103 files), blocks reordered to canonical order.</item>
|
|
12
9
|
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
13
10
|
|
|
14
11
|
Sweep batch 4: 73 Compass headers on headerless engine files (certification, component-runtime, isolation, evolution, testing), real KEY_DECISIONS on 75 files (kernel, cache, dht, swim, gitmesh, runtime), ~80 purpose expansions (CONTRACT-02/PURPOSE-02), non-goals on 13 CONTRACT-03 files, CS-07 history literal fix repo-wide (253 files). Policy: .template.ts/.template.astro excludedPaths. werkstatt-engine now 0 diagnostics.</item>
|
|
@@ -17,13 +14,22 @@ Sweep batch 4: 73 Compass headers on headerless engine files (certification, com
|
|
|
17
14
|
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
18
15
|
|
|
19
16
|
runProbeSet is the single shared execution point: barrier-free segments of test probes sharing one effective bound run in one vitest --reporter=json --outputFile process with per-(file,testName) attribution; missing files/reports yield unverified. run/page/proof and all non-test kinds are barriers. --no-batch escapes to the legacy path on acceptance.run, verification.emit and verification.refresh. rfc.validate reads non-target corpus files frontmatter-only via readRfcFrontmatter (64 KiB bound, full-parse fallback); emit/refresh/acceptance corpus scans use the same accessor. Corpus map slimmed to RfcCorpusEntry {fileName, frontmatter}.</item>
|
|
20
|
-
<
|
|
17
|
+
<item>RFC-1534: --fix scoped to V-19 amends/amendedBy asymmetries — re-applies the line-level counterpart merge, then drops repaired violations.</item>
|
|
18
|
+
<item>RFC-1513: steps 2-4 — batched committed-review reads + run-scoped index
|
|
19
|
+
|
|
20
|
+
OriginGit gains optional showMany backed by one git cat-file --batch
|
|
21
|
+
process (per-spec null on missing objects, wholesale null on spawn or
|
|
22
|
+
framing failure). collectCommittedReviews prefers it and keeps the
|
|
23
|
+
sequential show loop for stubs. rfc.validate memoizes the index once
|
|
24
|
+
per run and V-49 consumes it — identical diagnostics, one batched read.</item>
|
|
25
|
+
<history>RFC-0303, RFC-1097</history>
|
|
21
26
|
</CHANGE_SUMMARY>
|
|
22
27
|
*/
|
|
23
28
|
|
|
24
29
|
import path from "node:path";
|
|
25
30
|
|
|
26
31
|
import {
|
|
32
|
+
appendRfcFrontmatterListEntry,
|
|
27
33
|
listRfcFiles,
|
|
28
34
|
readAndParseRfc,
|
|
29
35
|
readRfcFrontmatter,
|
|
@@ -48,6 +54,9 @@ import { collectRfcCommandLifecycleViolations } from "./lifecycle.ts";
|
|
|
48
54
|
import { evaluateAcceptanceCriteria, computeProbeCoverage } from "./validate-rules.ts";
|
|
49
55
|
import { validateSingleRfc, checkFrontmatterYamlParse } from "./validate-rules.ts";
|
|
50
56
|
import { collectDecisionLog } from "../decision-log.ts";
|
|
57
|
+
import { collectCommittedReviews } from "./implement-stamp-deviations.ts";
|
|
58
|
+
import { createOriginGit } from "../verification-origin.ts";
|
|
59
|
+
import { loadForgeConfig } from "../../../src/config/forge-config.ts";
|
|
51
60
|
|
|
52
61
|
export async function runRfcValidate(
|
|
53
62
|
input: ForgeCommandInput,
|
|
@@ -130,6 +139,25 @@ export async function runRfcValidate(
|
|
|
130
139
|
return decisionLogPromise;
|
|
131
140
|
};
|
|
132
141
|
|
|
142
|
+
// RFC-1513: the committed-review index builds at most once per validate run
|
|
143
|
+
// — the getter memoizes so every `## Deviations`-carrying RFC shares one
|
|
144
|
+
// batched read instead of paying per-file `git show` calls (V-49).
|
|
145
|
+
let committedReviewsPromise:
|
|
146
|
+
| Promise<Awaited<ReturnType<typeof collectCommittedReviews>>>
|
|
147
|
+
| undefined;
|
|
148
|
+
const committedReviews = () => {
|
|
149
|
+
committedReviewsPromise ??= (async () => {
|
|
150
|
+
let reviewsDir: string | null = null;
|
|
151
|
+
try {
|
|
152
|
+
reviewsDir = loadForgeConfig(workspaceRoot).bindings?.paths?.reviewsDir ?? null;
|
|
153
|
+
} catch {
|
|
154
|
+
// forge.yaml unreadable → no committed-report index → entries dangle.
|
|
155
|
+
}
|
|
156
|
+
return collectCommittedReviews(createOriginGit(workspaceRoot), reviewsDir);
|
|
157
|
+
})();
|
|
158
|
+
return committedReviewsPromise;
|
|
159
|
+
};
|
|
160
|
+
|
|
133
161
|
for (const fileName of filesToValidate) {
|
|
134
162
|
const result = allParsedByFile.get(fileName);
|
|
135
163
|
if (!result) continue;
|
|
@@ -146,6 +174,7 @@ export async function runRfcValidate(
|
|
|
146
174
|
addViolation,
|
|
147
175
|
seenFilenameNumbers,
|
|
148
176
|
decisionLog,
|
|
177
|
+
committedReviews,
|
|
149
178
|
);
|
|
150
179
|
allMarkers.push(...markers);
|
|
151
180
|
|
|
@@ -176,6 +205,40 @@ export async function runRfcValidate(
|
|
|
176
205
|
);
|
|
177
206
|
}
|
|
178
207
|
|
|
208
|
+
// RFC-1534: --fix is scoped to the V-19 amends/amendedBy counterpart only —
|
|
209
|
+
// it re-applies the same line-level merge rfc.create --amends performs, then
|
|
210
|
+
// drops the repaired violations so the run reflects the post-fix state.
|
|
211
|
+
const fix = input.flags["fix"] === true;
|
|
212
|
+
const fixes: Array<{ file: string; key: string; added: string[] }> = [];
|
|
213
|
+
if (fix) {
|
|
214
|
+
const V19_ASYMMETRY =
|
|
215
|
+
/^(\S+)\.(amends|amendedBy) includes (\S+), but \3\.(amends|amendedBy) does not include \1$/;
|
|
216
|
+
const repaired = new Set<RfcValidationViolation>();
|
|
217
|
+
for (const v of violations) {
|
|
218
|
+
if (v.rule !== "V-19") continue;
|
|
219
|
+
const m = v.message.match(V19_ASYMMETRY);
|
|
220
|
+
if (!m) continue;
|
|
221
|
+
const [, fromId, , refId, missingKey] = m;
|
|
222
|
+
const entry = allParsed.get(refId!);
|
|
223
|
+
if (!entry) continue;
|
|
224
|
+
const wrote = await appendRfcFrontmatterListEntry(
|
|
225
|
+
path.join(rfcDirPath, entry.fileName),
|
|
226
|
+
missingKey!,
|
|
227
|
+
[fromId!],
|
|
228
|
+
);
|
|
229
|
+
if (wrote) {
|
|
230
|
+
repaired.add(v);
|
|
231
|
+
fixes.push({ file: `${RFC_DIR}/${entry.fileName}`, key: missingKey!, added: wrote.added });
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
for (const v of repaired) violations.splice(violations.indexOf(v), 1);
|
|
235
|
+
if (outputFormat === "pretty") {
|
|
236
|
+
for (const f of fixes) {
|
|
237
|
+
logger.info(`rfc.validate fix: merged ${f.added.join(", ")} into ${f.key} of ${f.file}`);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
179
242
|
const hasErrors = violations.some((v) => v.severity === "error");
|
|
180
243
|
const resultStatus = hasErrors ? "fail" : "pass";
|
|
181
244
|
|
|
@@ -212,6 +275,7 @@ export async function runRfcValidate(
|
|
|
212
275
|
violations,
|
|
213
276
|
markers: allMarkers,
|
|
214
277
|
coverage: coverage.length > 0 ? coverage : undefined,
|
|
278
|
+
...(fixes.length > 0 ? { fixes } : {}),
|
|
215
279
|
},
|
|
216
280
|
exitCode: hasErrors ? 1 : 0,
|
|
217
281
|
summary: hasErrors
|