@warpgogol/forge 9.1.1 → 9.3.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 +56 -0
- package/bin/cli.ts +5 -3
- package/dist/bin/cli.js +5 -3
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.d.ts +6 -0
- package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/adr/handlers/implement-stamp.js +23 -15
- package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
- package/dist/os/checks/handlers/counters-journal.d.ts.map +1 -1
- package/dist/os/checks/handlers/counters-journal.js +9 -1
- package/dist/os/checks/handlers/counters-journal.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +32 -39
- package/dist/os/core/core.module.js.map +1 -1
- package/dist/os/core/lock-holder.d.ts +32 -0
- package/dist/os/core/lock-holder.d.ts.map +1 -0
- package/dist/os/core/lock-holder.js +81 -0
- package/dist/os/core/lock-holder.js.map +1 -0
- package/dist/os/core/stamp-lock.d.ts +30 -0
- package/dist/os/core/stamp-lock.d.ts.map +1 -0
- package/dist/os/core/stamp-lock.js +112 -0
- package/dist/os/core/stamp-lock.js.map +1 -0
- package/dist/os/flow/branch-name.d.ts +56 -0
- package/dist/os/flow/branch-name.d.ts.map +1 -0
- package/dist/os/flow/branch-name.js +108 -0
- package/dist/os/flow/branch-name.js.map +1 -0
- package/dist/os/flow/digest.d.ts +92 -0
- package/dist/os/flow/digest.d.ts.map +1 -0
- package/dist/os/flow/digest.js +663 -0
- package/dist/os/flow/digest.js.map +1 -0
- package/dist/os/flow/flow.module.d.ts +3 -0
- package/dist/os/flow/flow.module.d.ts.map +1 -0
- package/dist/os/flow/flow.module.js +771 -0
- package/dist/os/flow/flow.module.js.map +1 -0
- package/dist/os/flow/git.d.ts +68 -0
- package/dist/os/flow/git.d.ts.map +1 -0
- package/dist/os/flow/git.js +257 -0
- package/dist/os/flow/git.js.map +1 -0
- package/dist/os/flow/guard-files.d.ts +50 -0
- package/dist/os/flow/guard-files.d.ts.map +1 -0
- package/dist/os/flow/guard-files.js +147 -0
- package/dist/os/flow/guard-files.js.map +1 -0
- package/dist/os/flow/handlers/flow-backmerge.d.ts +27 -0
- package/dist/os/flow/handlers/flow-backmerge.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-backmerge.js +332 -0
- package/dist/os/flow/handlers/flow-backmerge.js.map +1 -0
- package/dist/os/flow/handlers/flow-check.d.ts +42 -0
- package/dist/os/flow/handlers/flow-check.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-check.js +347 -0
- package/dist/os/flow/handlers/flow-check.js.map +1 -0
- package/dist/os/flow/handlers/flow-cut.d.ts +71 -0
- package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-cut.js +722 -0
- package/dist/os/flow/handlers/flow-cut.js.map +1 -0
- package/dist/os/flow/handlers/flow-digest.d.ts +5 -0
- package/dist/os/flow/handlers/flow-digest.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-digest.js +116 -0
- package/dist/os/flow/handlers/flow-digest.js.map +1 -0
- package/dist/os/flow/handlers/flow-discard.d.ts +22 -0
- package/dist/os/flow/handlers/flow-discard.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-discard.js +204 -0
- package/dist/os/flow/handlers/flow-discard.js.map +1 -0
- package/dist/os/flow/handlers/flow-fix.d.ts +47 -0
- package/dist/os/flow/handlers/flow-fix.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-fix.js +532 -0
- package/dist/os/flow/handlers/flow-fix.js.map +1 -0
- package/dist/os/flow/handlers/flow-hold.d.ts +32 -0
- package/dist/os/flow/handlers/flow-hold.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-hold.js +359 -0
- package/dist/os/flow/handlers/flow-hold.js.map +1 -0
- package/dist/os/flow/handlers/flow-install.d.ts +92 -0
- package/dist/os/flow/handlers/flow-install.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-install.js +883 -0
- package/dist/os/flow/handlers/flow-install.js.map +1 -0
- package/dist/os/flow/handlers/flow-integrate.d.ts +35 -0
- package/dist/os/flow/handlers/flow-integrate.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-integrate.js +436 -0
- package/dist/os/flow/handlers/flow-integrate.js.map +1 -0
- package/dist/os/flow/handlers/flow-open.d.ts +63 -0
- package/dist/os/flow/handlers/flow-open.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-open.js +294 -0
- package/dist/os/flow/handlers/flow-open.js.map +1 -0
- package/dist/os/flow/handlers/flow-publication-retire.d.ts +17 -0
- package/dist/os/flow/handlers/flow-publication-retire.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-publication-retire.js +132 -0
- package/dist/os/flow/handlers/flow-publication-retire.js.map +1 -0
- package/dist/os/flow/handlers/flow-push.d.ts +29 -0
- package/dist/os/flow/handlers/flow-push.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-push.js +397 -0
- package/dist/os/flow/handlers/flow-push.js.map +1 -0
- package/dist/os/flow/handlers/flow-status.d.ts +65 -0
- package/dist/os/flow/handlers/flow-status.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-status.js +193 -0
- package/dist/os/flow/handlers/flow-status.js.map +1 -0
- package/dist/os/flow/handlers/flow-unhold.d.ts +20 -0
- package/dist/os/flow/handlers/flow-unhold.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-unhold.js +158 -0
- package/dist/os/flow/handlers/flow-unhold.js.map +1 -0
- package/dist/os/flow/handlers/flow-version.d.ts +39 -0
- package/dist/os/flow/handlers/flow-version.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-version.js +122 -0
- package/dist/os/flow/handlers/flow-version.js.map +1 -0
- package/dist/os/flow/index.d.ts +30 -0
- package/dist/os/flow/index.d.ts.map +1 -0
- package/dist/os/flow/index.js +83 -0
- package/dist/os/flow/index.js.map +1 -0
- package/dist/os/flow/line-version.d.ts +23 -0
- package/dist/os/flow/line-version.d.ts.map +1 -0
- package/dist/os/flow/line-version.js +83 -0
- package/dist/os/flow/line-version.js.map +1 -0
- package/dist/os/flow/locks.d.ts +39 -0
- package/dist/os/flow/locks.d.ts.map +1 -0
- package/dist/os/flow/locks.js +177 -0
- package/dist/os/flow/locks.js.map +1 -0
- package/dist/os/flow/markers.d.ts +49 -0
- package/dist/os/flow/markers.d.ts.map +1 -0
- package/dist/os/flow/markers.js +112 -0
- package/dist/os/flow/markers.js.map +1 -0
- package/dist/os/flow/publication-order.d.ts +25 -0
- package/dist/os/flow/publication-order.d.ts.map +1 -0
- package/dist/os/flow/publication-order.js +75 -0
- package/dist/os/flow/publication-order.js.map +1 -0
- package/dist/os/flow/publish.d.ts +46 -0
- package/dist/os/flow/publish.d.ts.map +1 -0
- package/dist/os/flow/publish.js +209 -0
- package/dist/os/flow/publish.js.map +1 -0
- package/dist/os/flow/registry.d.ts +142 -0
- package/dist/os/flow/registry.d.ts.map +1 -0
- package/dist/os/flow/registry.js +199 -0
- package/dist/os/flow/registry.js.map +1 -0
- package/dist/os/flow/release-level.d.ts +23 -0
- package/dist/os/flow/release-level.d.ts.map +1 -0
- package/dist/os/flow/release-level.js +102 -0
- package/dist/os/flow/release-level.js.map +1 -0
- package/dist/os/flow/release-lines.d.ts +25 -0
- package/dist/os/flow/release-lines.d.ts.map +1 -0
- package/dist/os/flow/release-lines.js +172 -0
- package/dist/os/flow/release-lines.js.map +1 -0
- package/dist/os/flow/release-tags.d.ts +73 -0
- package/dist/os/flow/release-tags.d.ts.map +1 -0
- package/dist/os/flow/release-tags.js +167 -0
- package/dist/os/flow/release-tags.js.map +1 -0
- package/dist/os/flow/repo-kind.d.ts +41 -0
- package/dist/os/flow/repo-kind.d.ts.map +1 -0
- package/dist/os/flow/repo-kind.js +92 -0
- package/dist/os/flow/repo-kind.js.map +1 -0
- package/dist/os/flow/scripts.d.ts +20 -0
- package/dist/os/flow/scripts.d.ts.map +1 -0
- package/dist/os/flow/scripts.js +50 -0
- package/dist/os/flow/scripts.js.map +1 -0
- package/dist/os/flow/semver.d.ts +21 -0
- package/dist/os/flow/semver.d.ts.map +1 -0
- package/dist/os/flow/semver.js +73 -0
- package/dist/os/flow/semver.js.map +1 -0
- package/dist/os/flow/task-files.d.ts +11 -0
- package/dist/os/flow/task-files.d.ts.map +1 -0
- package/dist/os/flow/task-files.js +51 -0
- package/dist/os/flow/task-files.js.map +1 -0
- package/dist/os/flow/tests/helpers.d.ts +55 -0
- package/dist/os/flow/tests/helpers.d.ts.map +1 -0
- package/dist/os/flow/tests/helpers.js +193 -0
- package/dist/os/flow/tests/helpers.js.map +1 -0
- package/dist/os/flow/version-files.d.ts +21 -0
- package/dist/os/flow/version-files.d.ts.map +1 -0
- package/dist/os/flow/version-files.js +94 -0
- package/dist/os/flow/version-files.js.map +1 -0
- package/dist/os/flow/worktree-path.d.ts +31 -0
- package/dist/os/flow/worktree-path.d.ts.map +1 -0
- package/dist/os/flow/worktree-path.js +80 -0
- package/dist/os/flow/worktree-path.js.map +1 -0
- package/dist/os/mission/handlers/archive.d.ts.map +1 -1
- package/dist/os/mission/handlers/archive.js +44 -51
- package/dist/os/mission/handlers/archive.js.map +1 -1
- package/dist/os/mission/lockfile.d.ts +21 -0
- package/dist/os/mission/lockfile.d.ts.map +1 -0
- package/dist/os/mission/lockfile.js +76 -0
- package/dist/os/mission/lockfile.js.map +1 -0
- package/dist/os/mission/mission.module.d.ts.map +1 -1
- package/dist/os/mission/mission.module.js +2 -1
- package/dist/os/mission/mission.module.js.map +1 -1
- package/dist/os/program/handlers/seal.d.ts.map +1 -1
- package/dist/os/program/handlers/seal.js +1 -1
- package/dist/os/program/handlers/seal.js.map +1 -1
- package/dist/os/program/handlers/validate.d.ts.map +1 -1
- package/dist/os/program/handlers/validate.js +1 -1
- package/dist/os/program/handlers/validate.js.map +1 -1
- package/dist/os/program/program.module.d.ts.map +1 -1
- package/dist/os/program/program.module.js +2 -1
- package/dist/os/program/program.module.js.map +1 -1
- package/dist/os/program/schemas.d.ts +4 -6
- package/dist/os/program/schemas.d.ts.map +1 -1
- package/dist/os/program/schemas.js +16 -6
- package/dist/os/program/schemas.js.map +1 -1
- package/dist/os/program/state.d.ts +0 -1
- package/dist/os/program/state.d.ts.map +1 -1
- package/dist/os/program/state.js +1 -7
- package/dist/os/program/state.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts +21 -0
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +62 -13
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/frontmatter-io.d.ts +19 -0
- package/dist/os/rfc/frontmatter-io.d.ts.map +1 -1
- package/dist/os/rfc/frontmatter-io.js +65 -12
- package/dist/os/rfc/frontmatter-io.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts +6 -0
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +24 -19
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts +2 -5
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +10 -8
- 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 +15 -5
- package/dist/os/rfc/handlers/validate.js.map +1 -1
- package/dist/os/rfc/index.d.ts +2 -2
- package/dist/os/rfc/index.d.ts.map +1 -1
- package/dist/os/rfc/index.js +5 -2
- package/dist/os/rfc/index.js.map +1 -1
- package/dist/os/rfc/probe-batch.d.ts +71 -0
- package/dist/os/rfc/probe-batch.d.ts.map +1 -0
- package/dist/os/rfc/probe-batch.js +251 -0
- package/dist/os/rfc/probe-batch.js.map +1 -0
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +16 -2
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +21 -10
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +20 -13
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/system/handlers/outbox-validate.d.ts +8 -0
- package/dist/os/system/handlers/outbox-validate.d.ts.map +1 -0
- package/dist/os/system/handlers/outbox-validate.js +102 -0
- package/dist/os/system/handlers/outbox-validate.js.map +1 -0
- package/dist/os/system/handlers/system-map-validate.d.ts +13 -0
- package/dist/os/system/handlers/system-map-validate.d.ts.map +1 -0
- package/dist/os/system/handlers/system-map-validate.js +78 -0
- package/dist/os/system/handlers/system-map-validate.js.map +1 -0
- package/dist/os/system/handlers/system-outbox-scan.d.ts +10 -0
- package/dist/os/system/handlers/system-outbox-scan.d.ts.map +1 -0
- package/dist/os/system/handlers/system-outbox-scan.js +195 -0
- package/dist/os/system/handlers/system-outbox-scan.js.map +1 -0
- package/dist/os/system/handlers/system-task-collect.d.ts +13 -0
- package/dist/os/system/handlers/system-task-collect.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-collect.js +238 -0
- package/dist/os/system/handlers/system-task-collect.js.map +1 -0
- package/dist/os/system/handlers/system-task-create.d.ts +32 -0
- package/dist/os/system/handlers/system-task-create.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-create.js +216 -0
- package/dist/os/system/handlers/system-task-create.js.map +1 -0
- package/dist/os/system/handlers/system-task-dispatch.d.ts +14 -0
- package/dist/os/system/handlers/system-task-dispatch.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-dispatch.js +290 -0
- package/dist/os/system/handlers/system-task-dispatch.js.map +1 -0
- package/dist/os/system/handlers/system-task-move.d.ts +12 -0
- package/dist/os/system/handlers/system-task-move.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-move.js +217 -0
- package/dist/os/system/handlers/system-task-move.js.map +1 -0
- package/dist/os/system/handlers/system-task-status.d.ts +20 -0
- package/dist/os/system/handlers/system-task-status.d.ts.map +1 -0
- package/dist/os/system/handlers/system-task-status.js +139 -0
- package/dist/os/system/handlers/system-task-status.js.map +1 -0
- package/dist/os/system/handlers/system-versionset-record.d.ts +12 -0
- package/dist/os/system/handlers/system-versionset-record.d.ts.map +1 -0
- package/dist/os/system/handlers/system-versionset-record.js +332 -0
- package/dist/os/system/handlers/system-versionset-record.js.map +1 -0
- package/dist/os/system/index.d.ts +6 -0
- package/dist/os/system/index.d.ts.map +1 -0
- package/dist/os/system/index.js +18 -0
- package/dist/os/system/index.js.map +1 -0
- package/dist/os/system/outbox-schema.d.ts +30 -0
- package/dist/os/system/outbox-schema.d.ts.map +1 -0
- package/dist/os/system/outbox-schema.js +29 -0
- package/dist/os/system/outbox-schema.js.map +1 -0
- package/dist/os/system/repo.d.ts +64 -0
- package/dist/os/system/repo.d.ts.map +1 -0
- package/dist/os/system/repo.js +364 -0
- package/dist/os/system/repo.js.map +1 -0
- package/dist/os/system/scenario-schemas.d.ts +26 -0
- package/dist/os/system/scenario-schemas.d.ts.map +1 -0
- package/dist/os/system/scenario-schemas.js +53 -0
- package/dist/os/system/scenario-schemas.js.map +1 -0
- package/dist/os/system/schemas.d.ts +63 -0
- package/dist/os/system/schemas.d.ts.map +1 -0
- package/dist/os/system/schemas.js +83 -0
- package/dist/os/system/schemas.js.map +1 -0
- package/dist/os/system/system.module.d.ts +3 -0
- package/dist/os/system/system.module.d.ts.map +1 -0
- package/dist/os/system/system.module.js +429 -0
- package/dist/os/system/system.module.js.map +1 -0
- package/dist/os/system/task-schemas.d.ts +108 -0
- package/dist/os/system/task-schemas.d.ts.map +1 -0
- package/dist/os/system/task-schemas.js +152 -0
- package/dist/os/system/task-schemas.js.map +1 -0
- package/dist/os/system/task-store.d.ts +41 -0
- package/dist/os/system/task-store.d.ts.map +1 -0
- package/dist/os/system/task-store.js +142 -0
- package/dist/os/system/task-store.js.map +1 -0
- package/dist/os/system/tests/helpers.d.ts +30 -0
- package/dist/os/system/tests/helpers.d.ts.map +1 -0
- package/dist/os/system/tests/helpers.js +178 -0
- package/dist/os/system/tests/helpers.js.map +1 -0
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +21 -7
- package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.d.ts.map +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js +1 -1
- package/dist/os/werkstatt/handlers/werkstatt-operation-validate.js.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.d.ts.map +1 -1
- package/dist/os/werkstatt/werkstatt.module.js +2 -82
- package/dist/os/werkstatt/werkstatt.module.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +0 -3
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +2 -4
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
- package/dist/src/onboarding/agents-generate.js +49 -4
- package/dist/src/onboarding/agents-generate.js.map +1 -1
- package/dist/src/onboarding/create.d.ts +13 -0
- package/dist/src/onboarding/create.d.ts.map +1 -1
- package/dist/src/onboarding/create.js +95 -9
- package/dist/src/onboarding/create.js.map +1 -1
- package/dist/src/onboarding/doctor.d.ts.map +1 -1
- package/dist/src/onboarding/doctor.js +2 -47
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/upgrade.d.ts +5 -0
- package/dist/src/onboarding/upgrade.d.ts.map +1 -1
- package/dist/src/onboarding/upgrade.js +70 -1
- package/dist/src/onboarding/upgrade.js.map +1 -1
- package/dist/src/types.d.ts +9 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +2 -2
- package/docs/branch-model.md +98 -0
- package/docs/maintainers/publishing.md +10 -8
- package/docs/reference/cli.md +0 -3
- package/os/adr/handlers/implement-stamp-lock.test.ts +90 -0
- package/os/adr/handlers/implement-stamp.ts +29 -20
- package/os/checks/handlers/counters-journal.test.ts +10 -0
- package/os/checks/handlers/counters-journal.ts +8 -1
- package/os/core/core.module.ts +38 -39
- package/os/core/lock-holder.ts +88 -0
- package/os/core/stamp-lock.ts +142 -0
- package/os/flow/assets/flow-guard.sh +176 -0
- package/os/flow/branch-name.ts +139 -0
- package/os/flow/digest.ts +803 -0
- package/os/flow/flow.module.ts +796 -0
- package/os/flow/git.ts +342 -0
- package/os/flow/guard-files.ts +172 -0
- package/os/flow/handlers/flow-backmerge.ts +488 -0
- package/os/flow/handlers/flow-check.ts +450 -0
- package/os/flow/handlers/flow-cut.ts +1025 -0
- package/os/flow/handlers/flow-digest.ts +130 -0
- package/os/flow/handlers/flow-discard.ts +310 -0
- package/os/flow/handlers/flow-fix.ts +703 -0
- package/os/flow/handlers/flow-hold.ts +500 -0
- package/os/flow/handlers/flow-install.ts +1185 -0
- package/os/flow/handlers/flow-integrate.ts +623 -0
- package/os/flow/handlers/flow-open.ts +447 -0
- package/os/flow/handlers/flow-publication-retire.ts +156 -0
- package/os/flow/handlers/flow-push.ts +488 -0
- package/os/flow/handlers/flow-status.ts +283 -0
- package/os/flow/handlers/flow-unhold.ts +220 -0
- package/os/flow/handlers/flow-version.ts +196 -0
- package/os/flow/index.ts +102 -0
- package/os/flow/line-version.ts +113 -0
- package/os/flow/locks.ts +227 -0
- package/os/flow/markers.ts +135 -0
- package/os/flow/publication-order.ts +99 -0
- package/os/flow/publish.ts +272 -0
- package/os/flow/registry.ts +269 -0
- package/os/flow/release-level.ts +139 -0
- package/os/flow/release-lines.ts +208 -0
- package/os/flow/release-tags.ts +232 -0
- package/os/flow/repo-kind.ts +117 -0
- package/os/flow/scripts.ts +75 -0
- package/os/flow/semver.ts +82 -0
- package/os/flow/task-files.ts +59 -0
- package/os/flow/tests/branch-name.test.ts +136 -0
- package/os/flow/tests/fixtures/branch-names.yaml +56 -0
- package/os/flow/tests/flow-backmerge.test.ts +267 -0
- package/os/flow/tests/flow-check-version.test.ts +138 -0
- package/os/flow/tests/flow-check.test.ts +213 -0
- package/os/flow/tests/flow-cut-prepare.test.ts +298 -0
- package/os/flow/tests/flow-cut.rerun.test.ts +95 -0
- package/os/flow/tests/flow-cut.test.ts +323 -0
- package/os/flow/tests/flow-digest.test.ts +313 -0
- package/os/flow/tests/flow-discard.test.ts +220 -0
- package/os/flow/tests/flow-fix.test.ts +359 -0
- package/os/flow/tests/flow-guard-merge.test.ts +100 -0
- package/os/flow/tests/flow-guard-parity.test.ts +115 -0
- package/os/flow/tests/flow-guard-push.test.ts +100 -0
- package/os/flow/tests/flow-guard.test.ts +135 -0
- package/os/flow/tests/flow-hold.test.ts +465 -0
- package/os/flow/tests/flow-install-baseline.rerun.test.ts +73 -0
- package/os/flow/tests/flow-install-baseline.test.ts +164 -0
- package/os/flow/tests/flow-install-markers.test.ts +161 -0
- package/os/flow/tests/flow-install.rerun.test.ts +212 -0
- package/os/flow/tests/flow-install.test.ts +330 -0
- package/os/flow/tests/flow-integrate.rerun.test.ts +92 -0
- package/os/flow/tests/flow-integrate.test.ts +229 -0
- package/os/flow/tests/flow-open.test.ts +200 -0
- package/os/flow/tests/flow-publication-retire.test.ts +191 -0
- package/os/flow/tests/flow-push-publish.test.ts +282 -0
- package/os/flow/tests/flow-push-supersede.test.ts +221 -0
- package/os/flow/tests/flow-push.test.ts +160 -0
- package/os/flow/tests/flow-stale.test.ts +136 -0
- package/os/flow/tests/flow-status.test.ts +93 -0
- package/os/flow/tests/flow-task-files.test.ts +59 -0
- package/os/flow/tests/flow-version-level.test.ts +116 -0
- package/os/flow/tests/flow-version.test.ts +169 -0
- package/os/flow/tests/helpers.ts +239 -0
- package/os/flow/tests/is-flow-adopted.test.ts +71 -0
- package/os/flow/tests/locks.test.ts +219 -0
- package/os/flow/tests/publication-order.test.ts +102 -0
- package/os/flow/tests/registry.test.ts +150 -0
- package/os/flow/tests/repository-line-version.test.ts +100 -0
- package/os/flow/tests/scripts.test.ts +97 -0
- package/os/flow/tests/state-roots.test.ts +127 -0
- package/os/flow/tests/version-files.test.ts +145 -0
- package/os/flow/version-files.ts +115 -0
- package/os/flow/worktree-path.ts +107 -0
- package/os/mission/handlers/archive.test.ts +108 -36
- package/os/mission/handlers/archive.ts +46 -51
- package/os/mission/lockfile.ts +84 -0
- package/os/mission/mission.module.ts +2 -1
- package/os/program/handlers/seal.ts +1 -1
- package/os/program/handlers/validate.ts +1 -1
- package/os/program/program.module.ts +2 -1
- package/os/program/schemas.ts +51 -34
- package/os/program/state.ts +1 -9
- package/os/rfc/acceptance.ts +84 -19
- package/os/rfc/frontmatter-io.ts +78 -12
- package/os/rfc/handlers/implement-stamp-lock.test.ts +133 -0
- package/os/rfc/handlers/implement-stamp-stale.test.ts +22 -0
- package/os/rfc/handlers/implement-stamp.ts +30 -24
- package/os/rfc/handlers/validate-rules.test.ts +9 -6
- package/os/rfc/handlers/validate-rules.ts +12 -10
- package/os/rfc/handlers/validate.ts +17 -5
- package/os/rfc/index.ts +13 -1
- package/os/rfc/probe-batch.ts +329 -0
- package/os/rfc/rfc.module.ts +19 -2
- package/os/rfc/verification-emit-check.test.ts +22 -0
- package/os/rfc/verification-emit-freshness.test.ts +22 -0
- package/os/rfc/verification-emit.test.ts +22 -0
- package/os/rfc/verification-evidence.ts +21 -16
- package/os/rfc/verification-refresh.test.ts +22 -0
- package/os/rfc/verification-refresh.ts +20 -18
- package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +9 -0
- package/os/system/handlers/outbox-validate.ts +120 -0
- package/os/system/handlers/system-map-validate.ts +107 -0
- package/os/system/handlers/system-outbox-scan.ts +320 -0
- package/os/system/handlers/system-task-collect.ts +305 -0
- package/os/system/handlers/system-task-create.ts +271 -0
- package/os/system/handlers/system-task-dispatch.ts +387 -0
- package/os/system/handlers/system-task-move.ts +353 -0
- package/os/system/handlers/system-task-status.ts +176 -0
- package/os/system/handlers/system-versionset-record.ts +476 -0
- package/os/system/index.ts +47 -0
- package/os/system/outbox-schema.ts +47 -0
- package/os/system/repo.ts +451 -0
- package/os/system/scenario-schemas.ts +62 -0
- package/os/system/schemas.ts +102 -0
- package/os/system/system.module.ts +449 -0
- package/os/system/task-schemas.ts +190 -0
- package/os/system/task-store.ts +184 -0
- package/os/system/tests/helpers.ts +189 -0
- package/os/system/tests/outbox-validate.test.ts +92 -0
- package/os/system/tests/system-map-validate.test.ts +321 -0
- package/os/system/tests/system-outbox-scan.test.ts +273 -0
- package/os/system/tests/system-profile.test.ts +90 -0
- package/os/system/tests/system-task-collect.test.ts +293 -0
- package/os/system/tests/system-task-dispatch.test.ts +279 -0
- package/os/system/tests/system-task-status.test.ts +153 -0
- package/os/system/tests/system-task.test.ts +330 -0
- package/os/system/tests/system-versionset.test.ts +314 -0
- package/os/werkstatt/handlers/werkstatt-lock-recover.ts +22 -5
- package/os/werkstatt/handlers/werkstatt-operation-validate.ts +1 -1
- package/os/werkstatt/werkstatt.module.ts +2 -85
- package/package.json +49 -1
- package/profiles/forge-shell.yaml +22 -10
- package/profiles/godot-game.yaml +24 -13
- package/profiles/knowledge.yaml +19 -0
- package/profiles/phaser-game.yaml +25 -13
- package/profiles/site-workshop.yaml +27 -10
- package/profiles/system.yaml +650 -0
- package/profiles/typescript.yaml +26 -9
- package/skills/fo/fo-outbox/SKILL.md +71 -0
- package/skills/fo/fo-session-retro/SKILL.md +18 -7
- package/skills/fo/fo-step-commit/SKILL.md +2 -1
- package/skills/fo/fo-system-dispatch/SKILL.md +65 -0
- package/skills/fo/fo-task-run/SKILL.md +75 -0
- package/src/config/forge-config.ts +2 -6
- package/src/index.ts +19 -4
- package/src/onboarding/agents-generate.ts +49 -5
- package/src/onboarding/create.ts +101 -9
- package/src/onboarding/doctor.ts +2 -51
- package/src/onboarding/upgrade.ts +86 -1
- package/src/tests/agents-generate-flow.test.ts +132 -0
- package/src/tests/create-flow.test.ts +114 -0
- package/src/tests/create.test.ts +22 -21
- package/src/tests/doctor-autonomy.test.ts +2 -1
- package/src/tests/fixtures/agents-generate-business-before.txt +6 -0
- package/src/tests/implement-stamp.test.ts +26 -3
- package/src/tests/profile-flow-hooks.test.ts +77 -0
- package/src/tests/profile-schema.test.ts +2 -1
- package/src/tests/program-schemas.test.ts +66 -6
- package/src/tests/program-spec-node.test.ts +1 -5
- package/src/tests/rfc-evidence-sync.test.ts +22 -0
- package/src/tests/rfc-implement-stamp-governance.test.ts +25 -1
- package/src/tests/rfc-verification-verdict-ingest.test.ts +22 -0
- package/src/tests/upgrade-flow.test.ts +174 -0
- package/src/types.ts +11 -2
- package/dist/os/werkstatt/handlers/session-close.d.ts +0 -13
- package/dist/os/werkstatt/handlers/session-close.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/session-close.js +0 -56
- package/dist/os/werkstatt/handlers/session-close.js.map +0 -1
- package/dist/os/werkstatt/handlers/session-engine.d.ts +0 -3
- package/dist/os/werkstatt/handlers/session-engine.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/session-engine.js +0 -28
- package/dist/os/werkstatt/handlers/session-engine.js.map +0 -1
- package/dist/os/werkstatt/handlers/session-open.d.ts +0 -10
- package/dist/os/werkstatt/handlers/session-open.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/session-open.js +0 -46
- package/dist/os/werkstatt/handlers/session-open.js.map +0 -1
- package/dist/os/werkstatt/handlers/session-status.d.ts +0 -9
- package/dist/os/werkstatt/handlers/session-status.d.ts.map +0 -1
- package/dist/os/werkstatt/handlers/session-status.js +0 -34
- package/dist/os/werkstatt/handlers/session-status.js.map +0 -1
- package/os/werkstatt/handlers/session-close.ts +0 -82
- package/os/werkstatt/handlers/session-engine.ts +0 -34
- package/os/werkstatt/handlers/session-open.ts +0 -68
- package/os/werkstatt/handlers/session-status.ts +0 -55
|
@@ -9,6 +9,9 @@ Unit tests for verification emit covering rfc.verification.emit — baseline emi
|
|
|
9
9
|
</MODULE_CONTRACT>
|
|
10
10
|
<CHANGE_SUMMARY>
|
|
11
11
|
<item>RFC-1311: Compass header sweep — declares the verification suite's contract for test-file scaffold coverage.</item>
|
|
12
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
13
|
+
|
|
14
|
+
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>
|
|
12
15
|
</CHANGE_SUMMARY>
|
|
13
16
|
*/
|
|
14
17
|
|
|
@@ -32,6 +35,25 @@ const { mockRunProbe } = vi.hoisted(() => ({
|
|
|
32
35
|
|
|
33
36
|
vi.mock("./acceptance.ts", () => ({
|
|
34
37
|
runProbe: mockRunProbe,
|
|
38
|
+
// RFC-1489: emit drives runProbeSet — the shim preserves the per-probe
|
|
39
|
+
// mock contract so these tests observe the same probe calls as before.
|
|
40
|
+
runProbeSet: async (probes: unknown[], opts: Record<string, unknown>) => {
|
|
41
|
+
const results = [];
|
|
42
|
+
const durationsMs = [];
|
|
43
|
+
for (const p of probes) {
|
|
44
|
+
results.push(
|
|
45
|
+
await mockRunProbe(
|
|
46
|
+
p,
|
|
47
|
+
opts.workspaceRoot,
|
|
48
|
+
opts.commandRegistry,
|
|
49
|
+
opts.forgeRoot,
|
|
50
|
+
opts.outcomeSession,
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
durationsMs.push(0);
|
|
54
|
+
}
|
|
55
|
+
return { results, durationsMs };
|
|
56
|
+
},
|
|
35
57
|
}));
|
|
36
58
|
|
|
37
59
|
const RFC_FRONTMATTER = (id: string, status: string, probes: Record<string, unknown>[] = []) => {
|
|
@@ -12,7 +12,6 @@ a JSON evidence envelope to docs/rfcs/verification/<slug>.generated.yaml.
|
|
|
12
12
|
</non-goals>
|
|
13
13
|
</MODULE_CONTRACT>
|
|
14
14
|
<CHANGE_SUMMARY>
|
|
15
|
-
<item>RFC-1391: make the formal verification tier checker-bound (RFC-1391)</item>
|
|
16
15
|
<item>RFC-1391: unblock evidence emission for proof-probe RFCs (RFC-1391)
|
|
17
16
|
|
|
18
17
|
probeArtifactCandidates lacked a `proof` branch — the default threw
|
|
@@ -32,7 +31,10 @@ workspace; the exhaustive entry dispatches per packageManager; proved runs
|
|
|
32
31
|
record log, counterexample stays the refuted-path record.</item>
|
|
33
32
|
<item>RFC-1453: executed outcome probes, IMP-14 surface gate, outcome.serve + V-47/V-48</item>
|
|
34
33
|
<item>RFC-1458: emit requirement-mapped verdict events from deploy.smoke.run</item>
|
|
35
|
-
<
|
|
34
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
35
|
+
|
|
36
|
+
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>
|
|
37
|
+
<history>RFC-0330, RFC-0999, RFC-1237, RFC-1249, RFC-1271, RFC-1320, RFC-1330, RFC-1334, RFC-1372, RFC-1391</history>
|
|
36
38
|
</CHANGE_SUMMARY>
|
|
37
39
|
*/
|
|
38
40
|
|
|
@@ -40,15 +42,14 @@ import { execFile } from "../../src/utils/sync-fs.ts";
|
|
|
40
42
|
import { ambientIo, resolveIo } from "../../src/utils/io.ts";
|
|
41
43
|
|
|
42
44
|
import { join, relative } from "node:path";
|
|
43
|
-
import { performance } from "node:perf_hooks";
|
|
44
45
|
import { byteHash } from "../../src/utils/hash.ts";
|
|
45
46
|
|
|
46
|
-
import {
|
|
47
|
+
import { runProbeSet } from "./acceptance.ts";
|
|
47
48
|
import { createOutcomeSession } from "./outcome-probe.ts";
|
|
48
49
|
import { attachProbeOrigins } from "./verification-origin.ts";
|
|
49
50
|
import { attachVerdictEvidence } from "./verification-verdicts.ts";
|
|
50
51
|
import { EVIDENCE_SYNC_STEPS } from "./handlers/rfc-evidence-sync.ts";
|
|
51
|
-
import { listRfcFiles,
|
|
52
|
+
import { listRfcFiles, readRfcFrontmatter } from "./frontmatter-io.ts";
|
|
52
53
|
import { generatedHeaderFields } from "../../src/utils/generated-marker.ts";
|
|
53
54
|
import { parse as yamlParse, stringify as yamlStringify } from "yaml";
|
|
54
55
|
import { RFC_DIR } from "./types.ts";
|
|
@@ -514,7 +515,9 @@ export async function runRfcVerificationEmit(
|
|
|
514
515
|
checkEntry?: NonNullable<RfcVerificationEmitResult["check"]>[number];
|
|
515
516
|
diagnostic?: Diagnostic;
|
|
516
517
|
}> => {
|
|
517
|
-
|
|
518
|
+
// RFC-1489: emit reads frontmatter only — the body is re-read separately
|
|
519
|
+
// below for freshness/artifact checks, never through this scan.
|
|
520
|
+
const parsedFile = await readRfcFrontmatter(rfcDirPath, fileName);
|
|
518
521
|
if (!parsedFile) return {};
|
|
519
522
|
if ("error" in parsedFile) return {};
|
|
520
523
|
const fm = parsedFile.parsed.frontmatter;
|
|
@@ -554,16 +557,18 @@ export async function runRfcVerificationEmit(
|
|
|
554
557
|
const rfcMarkdown = await io.readFile(rfcFilePath);
|
|
555
558
|
const emittedAt = new Date().toISOString();
|
|
556
559
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
560
|
+
// RFC-1489: batch-compatible test probes share one Vitest run via
|
|
561
|
+
// runProbeSet; `--no-batch` forces the legacy per-probe path.
|
|
562
|
+
const { results: setResults, durationsMs } = await runProbeSet(probes, {
|
|
563
|
+
workspaceRoot,
|
|
564
|
+
commandRegistry: context.commandRegistry,
|
|
565
|
+
forgeRoot: context.forgeRoot,
|
|
566
|
+
outcomeSession,
|
|
567
|
+
noBatch: input.flags["no-batch"] === true,
|
|
568
|
+
});
|
|
569
|
+
for (const [probeIndex, probe] of probes.entries()) {
|
|
570
|
+
const result = setResults[probeIndex]!;
|
|
571
|
+
const durationMs = durationsMs[probeIndex]!;
|
|
567
572
|
probeRecords.push({
|
|
568
573
|
probe,
|
|
569
574
|
ok: result.ok,
|
|
@@ -17,6 +17,9 @@ without verdict/hashes and trip RFC-IMP-13 on next stamp; mirrored the emit
|
|
|
17
17
|
spread and pinned it with a regression test. proof.check pretty output now
|
|
18
18
|
prints the persisted log; every exhaustive verdict path carries vitest
|
|
19
19
|
output as log.</item>
|
|
20
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
21
|
+
|
|
22
|
+
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
23
|
</CHANGE_SUMMARY>
|
|
21
24
|
*/
|
|
22
25
|
|
|
@@ -38,6 +41,25 @@ const { mockRunProbe, mockCaptureGitContext, mockGetKernelVersion } = vi.hoisted
|
|
|
38
41
|
|
|
39
42
|
vi.mock("./acceptance.ts", () => ({
|
|
40
43
|
runProbe: mockRunProbe,
|
|
44
|
+
// RFC-1489: refresh drives runProbeSet — the shim preserves the per-probe
|
|
45
|
+
// mock contract so these tests observe the same probe calls as before.
|
|
46
|
+
runProbeSet: async (probes: unknown[], opts: Record<string, unknown>) => {
|
|
47
|
+
const results = [];
|
|
48
|
+
const durationsMs = [];
|
|
49
|
+
for (const p of probes) {
|
|
50
|
+
results.push(
|
|
51
|
+
await mockRunProbe(
|
|
52
|
+
p,
|
|
53
|
+
opts.workspaceRoot,
|
|
54
|
+
opts.commandRegistry,
|
|
55
|
+
opts.forgeRoot,
|
|
56
|
+
opts.outcomeSession,
|
|
57
|
+
),
|
|
58
|
+
);
|
|
59
|
+
durationsMs.push(0);
|
|
60
|
+
}
|
|
61
|
+
return { results, durationsMs };
|
|
62
|
+
},
|
|
41
63
|
}));
|
|
42
64
|
|
|
43
65
|
vi.mock("./verification-evidence.ts", async (importOriginal) => {
|
|
@@ -13,10 +13,6 @@ lastRefreshedAt, replaces probes[] with fresh results. Supports --id,
|
|
|
13
13
|
</non-goals>
|
|
14
14
|
</MODULE_CONTRACT>
|
|
15
15
|
<CHANGE_SUMMARY>
|
|
16
|
-
<item>RFC-1237: dual-read dry-run (context.dryRun || flags["dry-run"]),
|
|
17
|
-
io.writeFile port routing, emit-canonical generated header — refresh owns
|
|
18
|
-
content freshness, never envelope identity (ownerCommand stays
|
|
19
|
-
rfc.verification.emit).</item>
|
|
20
16
|
<item>RFC-1249: wire werkstatt.commands.validate into packages.check + retire CMD-OUTPUT debt</item>
|
|
21
17
|
<item>RFC-1330: refresh attaches git-derived origin like emit.</item>
|
|
22
18
|
<item>RFC-1391: close RFC-1391 review r1 findings — evidence freshness, config classification, contract guards
|
|
@@ -35,18 +31,20 @@ without verdict/hashes and trip RFC-IMP-13 on next stamp; mirrored the emit
|
|
|
35
31
|
spread and pinned it with a regression test. proof.check pretty output now
|
|
36
32
|
prints the persisted log; every exhaustive verdict path carries vitest
|
|
37
33
|
output as log.</item>
|
|
38
|
-
<
|
|
34
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
35
|
+
|
|
36
|
+
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>
|
|
37
|
+
<history>RFC-0999, RFC-1237</history>
|
|
39
38
|
</CHANGE_SUMMARY>
|
|
40
39
|
*/
|
|
41
40
|
|
|
42
41
|
import { join, relative } from "node:path";
|
|
43
42
|
import { resolveIo } from "../../src/utils/io.ts";
|
|
44
|
-
import { performance } from "node:perf_hooks";
|
|
45
43
|
import { parse as yamlParse } from "yaml";
|
|
46
44
|
|
|
47
|
-
import {
|
|
45
|
+
import { runProbeSet } from "./acceptance.ts";
|
|
48
46
|
import { attachProbeOrigins } from "./verification-origin.ts";
|
|
49
|
-
import { listRfcFiles,
|
|
47
|
+
import { listRfcFiles, readRfcFrontmatter } from "./frontmatter-io.ts";
|
|
50
48
|
import {
|
|
51
49
|
captureGitContext,
|
|
52
50
|
getKernelVersion,
|
|
@@ -115,7 +113,9 @@ export async function runRfcVerificationRefresh(
|
|
|
115
113
|
skippedEntry?: NonNullable<RfcVerificationRefreshResult["skipped"]>[number];
|
|
116
114
|
diagnostic?: Diagnostic;
|
|
117
115
|
}> => {
|
|
118
|
-
|
|
116
|
+
// RFC-1489: refresh needs frontmatter only (id/status/acceptance); the
|
|
117
|
+
// evidence envelope and RFC bytes are read separately below.
|
|
118
|
+
const parsedFile = await readRfcFrontmatter(rfcDirPath, fileName);
|
|
119
119
|
if (!parsedFile) return {};
|
|
120
120
|
if ("error" in parsedFile) return {};
|
|
121
121
|
const fm = parsedFile.parsed.frontmatter;
|
|
@@ -155,15 +155,17 @@ export async function runRfcVerificationRefresh(
|
|
|
155
155
|
const rfcMarkdown = await io.readFile(rfcFilePath);
|
|
156
156
|
const now = new Date().toISOString();
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
158
|
+
// RFC-1489: batch-compatible test probes share one Vitest run via
|
|
159
|
+
// runProbeSet; `--no-batch` forces the legacy per-probe path.
|
|
160
|
+
const { results: setResults, durationsMs } = await runProbeSet(probes, {
|
|
161
|
+
workspaceRoot,
|
|
162
|
+
commandRegistry: context.commandRegistry,
|
|
163
|
+
forgeRoot: context.forgeRoot,
|
|
164
|
+
noBatch: input.flags["no-batch"] === true,
|
|
165
|
+
});
|
|
166
|
+
for (const [probeIndex, probe] of probes.entries()) {
|
|
167
|
+
const result = setResults[probeIndex]!;
|
|
168
|
+
const durationMs = durationsMs[probeIndex]!;
|
|
167
169
|
probeRecords.push({
|
|
168
170
|
probe,
|
|
169
171
|
ok: result.ok,
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
9
|
<item>RFC-1485: sweep compass headers — forge-os-rfc</item>
|
|
10
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
11
|
+
|
|
12
|
+
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>
|
|
10
13
|
</CHANGE_SUMMARY>
|
|
11
14
|
*/
|
|
12
15
|
|
|
@@ -25,6 +28,12 @@ import type { ForgeCommandInput, ForgeRuntimeContext } from "../../../../src/typ
|
|
|
25
28
|
|
|
26
29
|
vi.mock("../../acceptance.ts", () => ({
|
|
27
30
|
runProbe: vi.fn(async (probe: unknown) => ({ probe, ok: true, detail: "ok" })),
|
|
31
|
+
// RFC-1489: emit (which stamp composes) drives runProbeSet — the shim
|
|
32
|
+
// preserves the per-probe mock contract.
|
|
33
|
+
runProbeSet: vi.fn(async (probes: unknown[]) => ({
|
|
34
|
+
results: probes.map((probe) => ({ probe, ok: true, detail: "ok" })),
|
|
35
|
+
durationsMs: probes.map(() => 0),
|
|
36
|
+
})),
|
|
28
37
|
}));
|
|
29
38
|
|
|
30
39
|
const git = (dir: string, args: string[]) =>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>outbox.validate (RFC-1510) — the single validator of the outbox
|
|
4
|
+
contract (DNA-91). Reads docs/outbox/*.yaml in ANY repository profile,
|
|
5
|
+
checks every entry against forge/outbox@1 (OUTBOX-01) and binds each entry's
|
|
6
|
+
id to its filename stem (OUTBOX-02). An absent docs/outbox/ is a pass —
|
|
7
|
+
outbox adoption is opt-in per product.</purpose>
|
|
8
|
+
<non-goals>
|
|
9
|
+
<item>No system-side checks — matching and the identity-leak warning are
|
|
10
|
+
system.outbox.scan's job; a product cannot know a system's name.</item>
|
|
11
|
+
</non-goals>
|
|
12
|
+
</MODULE_CONTRACT>
|
|
13
|
+
<CHANGE_SUMMARY>
|
|
14
|
+
<item>RFC-1510: step 2 — profile-agnostic outbox entry validator</item>
|
|
15
|
+
<item>RFC-1510: implement RFC-1510 — product outbox for dependency-contract requests</item>
|
|
16
|
+
<item>RFC-1510: close RFC-1510 review r1 findings — folder crash guard, ls-tree allowlist, OUTBOX-02 on develop</item>
|
|
17
|
+
<item>RFC-1510: close RFC-1510 review r2 — declare OUTBOX-02 in scan rules, flat-scope test, readdir TOCTOU guard</item>
|
|
18
|
+
</CHANGE_SUMMARY>
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import path from "node:path";
|
|
22
|
+
import YAML from "yaml";
|
|
23
|
+
|
|
24
|
+
import { resolveIo } from "../../../src/utils/io.ts";
|
|
25
|
+
import type {
|
|
26
|
+
Diagnostic,
|
|
27
|
+
ForgeCommandInput,
|
|
28
|
+
ForgeCommandResult,
|
|
29
|
+
ForgeRuntimeContext,
|
|
30
|
+
} from "../../../src/types.ts";
|
|
31
|
+
import { OUTBOX_DIR, outboxEntrySchema } from "../outbox-schema.ts";
|
|
32
|
+
|
|
33
|
+
export interface OutboxValidateResult {
|
|
34
|
+
command: "outbox.validate";
|
|
35
|
+
checked: number;
|
|
36
|
+
diagnostics: Diagnostic[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function schemaIssues(error: { issues: { path: PropertyKey[]; message: string }[] }): string {
|
|
40
|
+
return error.issues
|
|
41
|
+
.map((issue) => `${issue.path.map(String).join(".") || "(root)"}: ${issue.message}`)
|
|
42
|
+
.join("; ");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export async function runOutboxValidate(
|
|
46
|
+
_input: ForgeCommandInput,
|
|
47
|
+
context: ForgeRuntimeContext,
|
|
48
|
+
): Promise<ForgeCommandResult<OutboxValidateResult>> {
|
|
49
|
+
const io = resolveIo(context.io);
|
|
50
|
+
const root = context.workspaceRoot;
|
|
51
|
+
const diagnostics: Diagnostic[] = [];
|
|
52
|
+
const dir = path.join(root, OUTBOX_DIR);
|
|
53
|
+
|
|
54
|
+
let checked = 0;
|
|
55
|
+
let isDir = false;
|
|
56
|
+
try {
|
|
57
|
+
isDir = (await io.stat(dir)).isDirectory;
|
|
58
|
+
} catch {
|
|
59
|
+
isDir = false;
|
|
60
|
+
}
|
|
61
|
+
let entries: Awaited<ReturnType<typeof io.readdir>> = [];
|
|
62
|
+
if (isDir) {
|
|
63
|
+
try {
|
|
64
|
+
entries = await io.readdir(dir);
|
|
65
|
+
} catch {
|
|
66
|
+
entries = [];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
for (const entry of entries) {
|
|
70
|
+
if (!entry.isFile || !entry.name.endsWith(".yaml")) continue;
|
|
71
|
+
const rel = path.posix.join(OUTBOX_DIR, entry.name);
|
|
72
|
+
const file = path.join(dir, entry.name);
|
|
73
|
+
checked += 1;
|
|
74
|
+
|
|
75
|
+
let raw: unknown;
|
|
76
|
+
try {
|
|
77
|
+
raw = YAML.parse(await io.readFile(file));
|
|
78
|
+
} catch (error) {
|
|
79
|
+
diagnostics.push({
|
|
80
|
+
ruleId: "OUTBOX-01",
|
|
81
|
+
severity: "error",
|
|
82
|
+
file: rel,
|
|
83
|
+
message: `${rel} is not parseable YAML: ${error instanceof Error ? error.message : String(error)}`,
|
|
84
|
+
fixHint: "Repair the entry — see forge/outbox@1.",
|
|
85
|
+
});
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const parsed = outboxEntrySchema.safeParse(raw);
|
|
89
|
+
if (!parsed.success) {
|
|
90
|
+
diagnostics.push({
|
|
91
|
+
ruleId: "OUTBOX-01",
|
|
92
|
+
severity: "error",
|
|
93
|
+
file: rel,
|
|
94
|
+
message: `${rel} fails forge/outbox@1: ${schemaIssues(parsed.error)}`,
|
|
95
|
+
fixHint: "See the fo-outbox skill — an entry names a contract, need, why and state.",
|
|
96
|
+
});
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const stem = entry.name.slice(0, -".yaml".length);
|
|
100
|
+
if (parsed.data.id !== stem) {
|
|
101
|
+
diagnostics.push({
|
|
102
|
+
ruleId: "OUTBOX-02",
|
|
103
|
+
severity: "error",
|
|
104
|
+
file: rel,
|
|
105
|
+
message: `${rel} declares id ${parsed.data.id} but the filename stem is ${stem}`,
|
|
106
|
+
fixHint: "Rename the file or fix the id — the filename stem is the canonical id.",
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
const errors = diagnostics.filter((d) => d.severity === "error").length;
|
|
112
|
+
return {
|
|
113
|
+
data: { command: "outbox.validate", checked, diagnostics },
|
|
114
|
+
exitCode: errors > 0 ? 1 : 0,
|
|
115
|
+
summary:
|
|
116
|
+
checked === 0
|
|
117
|
+
? "outbox.validate: no docs/outbox/ entries — pass"
|
|
118
|
+
: `outbox.validate: ${checked} entr${checked === 1 ? "y" : "ies"}, ${errors} error(s)`,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>system.map.validate command handler (RFC-1508) — gates on the system
|
|
4
|
+
profile (SYSTEM-01), loads the system map non-throwing (SYSTEM-MAP-01), then
|
|
5
|
+
evaluates the cross-file rules (SYSTEM-MAP-02..05). Read-only: exit 1 iff an
|
|
6
|
+
error-severity diagnostic exists.</purpose>
|
|
7
|
+
<non-goals>
|
|
8
|
+
<item>Do not mutate any files.</item>
|
|
9
|
+
<item>No task, outbox, scenario or version-set behavior — RFC-1509..1511.</item>
|
|
10
|
+
</non-goals>
|
|
11
|
+
</MODULE_CONTRACT>
|
|
12
|
+
<CHANGE_SUMMARY>
|
|
13
|
+
<item>RFC-1508: step 3 — system.map.validate handler</item>
|
|
14
|
+
<item>RFC-1508: implement RFC-1508 — system profile, system map schemas and system.map.validate</item>
|
|
15
|
+
<item>RFC-1508: align rfc-1508 schemas with the normative contract after review r1</item>
|
|
16
|
+
<item>RFC-1511: scenarios, version sets and system.versionset.record</item>
|
|
17
|
+
</CHANGE_SUMMARY>
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { resolveIo } from "../../../src/utils/io.ts";
|
|
21
|
+
import type {
|
|
22
|
+
Diagnostic,
|
|
23
|
+
ForgeCommandInput,
|
|
24
|
+
ForgeCommandResult,
|
|
25
|
+
ForgeRuntimeContext,
|
|
26
|
+
} from "../../../src/types.ts";
|
|
27
|
+
import {
|
|
28
|
+
assertSystemRepository,
|
|
29
|
+
loadScenarios,
|
|
30
|
+
loadSystemMap,
|
|
31
|
+
validateScenarios,
|
|
32
|
+
validateSystemMap,
|
|
33
|
+
} from "../repo.ts";
|
|
34
|
+
|
|
35
|
+
export interface SystemMapValidateResult {
|
|
36
|
+
command: "system.map.validate";
|
|
37
|
+
status: "pass" | "warn" | "fail";
|
|
38
|
+
systemId: string | null;
|
|
39
|
+
products: number;
|
|
40
|
+
allowed: number;
|
|
41
|
+
forbidden: number;
|
|
42
|
+
localFolders: number | null;
|
|
43
|
+
diagnostics: Diagnostic[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export async function runSystemMapValidate(
|
|
47
|
+
_input: ForgeCommandInput,
|
|
48
|
+
context: ForgeRuntimeContext,
|
|
49
|
+
): Promise<ForgeCommandResult<SystemMapValidateResult>> {
|
|
50
|
+
const io = resolveIo(context.io);
|
|
51
|
+
const root = context.workspaceRoot;
|
|
52
|
+
const diagnostics: Diagnostic[] = [];
|
|
53
|
+
|
|
54
|
+
const refusal = await assertSystemRepository(root, io);
|
|
55
|
+
let map: Awaited<ReturnType<typeof loadSystemMap>>["map"] = null;
|
|
56
|
+
if (refusal) {
|
|
57
|
+
diagnostics.push(refusal);
|
|
58
|
+
} else {
|
|
59
|
+
const loaded = await loadSystemMap(root, io);
|
|
60
|
+
diagnostics.push(...loaded.diagnostics);
|
|
61
|
+
map = loaded.map;
|
|
62
|
+
if (map) {
|
|
63
|
+
diagnostics.push(...(await validateSystemMap(map, io)));
|
|
64
|
+
const scenarios = await loadScenarios(root, io);
|
|
65
|
+
diagnostics.push(...scenarios.diagnostics);
|
|
66
|
+
diagnostics.push(...validateScenarios(map, scenarios.scenarios));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const errors = diagnostics.filter((d) => d.severity === "error").length;
|
|
71
|
+
const warnings = diagnostics.filter((d) => d.severity === "warning").length;
|
|
72
|
+
|
|
73
|
+
if (context.outputFormat === "pretty") {
|
|
74
|
+
for (const d of diagnostics) {
|
|
75
|
+
const line = `${d.ruleId} · ${d.file ? `${d.file}: ` : ""}${d.message}`;
|
|
76
|
+
if (d.severity === "error") context.logger.error(line);
|
|
77
|
+
else if (d.severity === "warning") context.logger.warn(line);
|
|
78
|
+
else context.logger.info(line);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const result: SystemMapValidateResult = {
|
|
83
|
+
command: "system.map.validate",
|
|
84
|
+
status: errors > 0 ? "fail" : warnings > 0 ? "warn" : "pass",
|
|
85
|
+
systemId: map?.system.id ?? null,
|
|
86
|
+
products: map?.products.products.length ?? 0,
|
|
87
|
+
allowed: map?.edges.allowed.length ?? 0,
|
|
88
|
+
forbidden: map?.edges.forbidden.length ?? 0,
|
|
89
|
+
localFolders: map?.local ? Object.keys(map.local.folders).length : null,
|
|
90
|
+
diagnostics,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
data: result,
|
|
95
|
+
exitCode: errors > 0 ? 1 : 0,
|
|
96
|
+
summary: `system.map.validate: ${errors} error(s), ${warnings} warning(s) — ${result.products} product(s), ${result.allowed} allowed and ${result.forbidden} forbidden edge(s)`,
|
|
97
|
+
nextSteps:
|
|
98
|
+
errors > 0
|
|
99
|
+
? [{ action: "Fix the error-severity system-map diagnostics above", kind: "required" }]
|
|
100
|
+
: [
|
|
101
|
+
{
|
|
102
|
+
action: "Declare products, offered contracts and edges under system/ as the system grows",
|
|
103
|
+
kind: "optional",
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
};
|
|
107
|
+
}
|