@warpgogol/forge 9.1.0 → 9.2.3
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 +39 -0
- package/README.md +15 -8
- package/README.uk.md +15 -8
- package/bin/cli.ts +3 -2
- package/dist/bin/cli.js +3 -2
- package/dist/bin/cli.js.map +1 -1
- package/dist/os/core/core.module.d.ts.map +1 -1
- package/dist/os/core/core.module.js +6 -4
- package/dist/os/core/core.module.js.map +1 -1
- 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 +73 -0
- package/dist/os/flow/digest.d.ts.map +1 -0
- package/dist/os/flow/digest.js +634 -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 +716 -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 +63 -0
- package/dist/os/flow/handlers/flow-cut.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-cut.js +636 -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 +110 -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 +200 -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 +443 -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 +419 -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-push.d.ts +22 -0
- package/dist/os/flow/handlers/flow-push.d.ts.map +1 -0
- package/dist/os/flow/handlers/flow-push.js +306 -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 +34 -0
- package/dist/os/flow/locks.d.ts.map +1 -0
- package/dist/os/flow/locks.js +147 -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/publish.d.ts +28 -0
- package/dist/os/flow/publish.d.ts.map +1 -0
- package/dist/os/flow/publish.js +153 -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 +198 -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 +72 -0
- package/dist/os/flow/release-tags.d.ts.map +1 -0
- package/dist/os/flow/release-tags.js +166 -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 +49 -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/tests/helpers.d.ts +52 -0
- package/dist/os/flow/tests/helpers.d.ts.map +1 -0
- package/dist/os/flow/tests/helpers.js +189 -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 +43 -6
- package/dist/os/mission/handlers/archive.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/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/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 +3 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- 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 +14 -6
- package/docs/reference/cli.md +125 -0
- package/docs/reference/profiles.md +1 -0
- package/os/core/core.module.ts +7 -4
- package/os/flow/assets/flow-guard.sh +176 -0
- package/os/flow/branch-name.ts +139 -0
- package/os/flow/digest.ts +761 -0
- package/os/flow/flow.module.ts +740 -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 +912 -0
- package/os/flow/handlers/flow-digest.ts +124 -0
- package/os/flow/handlers/flow-discard.ts +301 -0
- package/os/flow/handlers/flow-fix.ts +597 -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 +607 -0
- package/os/flow/handlers/flow-open.ts +447 -0
- package/os/flow/handlers/flow-push.ts +373 -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 +177 -0
- package/os/flow/markers.ts +135 -0
- package/os/flow/publish.ts +201 -0
- package/os/flow/registry.ts +266 -0
- package/os/flow/release-level.ts +139 -0
- package/os/flow/release-lines.ts +208 -0
- package/os/flow/release-tags.ts +231 -0
- package/os/flow/repo-kind.ts +117 -0
- package/os/flow/scripts.ts +73 -0
- package/os/flow/semver.ts +82 -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.rerun.test.ts +95 -0
- package/os/flow/tests/flow-cut.test.ts +319 -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-push-publish.test.ts +282 -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-version-level.test.ts +116 -0
- package/os/flow/tests/flow-version.test.ts +169 -0
- package/os/flow/tests/helpers.ts +235 -0
- package/os/flow/tests/is-flow-adopted.test.ts +71 -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 +27 -0
- package/os/mission/handlers/archive.ts +46 -6
- 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-stale.test.ts +22 -0
- 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/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 +17 -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/typescript.yaml +26 -9
- package/skills/fo/fo-session-retro/SKILL.md +18 -7
- package/skills/fo/fo-step-commit/SKILL.md +2 -1
- package/src/config/forge-config.ts +2 -6
- package/src/index.ts +8 -0
- 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/implement-stamp.test.ts +26 -3
- package/src/tests/profile-flow-hooks.test.ts +77 -0
- 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
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
</non-goals>
|
|
7
7
|
</MODULE_CONTRACT>
|
|
8
8
|
<CHANGE_SUMMARY>
|
|
9
|
-
<item>RFC-0303: extracted validate handler from handlers.ts into handlers/validate.ts.</item>
|
|
10
9
|
<item>RFC-1097: step 6 — compass.migrate codemod run
|
|
11
10
|
|
|
12
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>
|
|
@@ -15,6 +14,10 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
|
|
|
15
14
|
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>
|
|
16
15
|
<item>KERNEL-FLAG-02: Guard --id against non-string values (boolean/array from unvalidated flag input) — throws a clear flag error instead of TypeError in rfcFileMatchesId.</item>
|
|
17
16
|
<item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
|
|
17
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
18
|
+
|
|
19
|
+
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
|
+
<history>RFC-0303</history>
|
|
18
21
|
</CHANGE_SUMMARY>
|
|
19
22
|
*/
|
|
20
23
|
|
|
@@ -23,8 +26,10 @@ import path from "node:path";
|
|
|
23
26
|
import {
|
|
24
27
|
listRfcFiles,
|
|
25
28
|
readAndParseRfc,
|
|
29
|
+
readRfcFrontmatter,
|
|
26
30
|
rfcFileMatchesId,
|
|
27
31
|
type ParsedRfc,
|
|
32
|
+
type RfcCorpusEntry,
|
|
28
33
|
} from "../frontmatter-io.ts";
|
|
29
34
|
import type {
|
|
30
35
|
ForgeCommandInput,
|
|
@@ -73,7 +78,9 @@ export async function runRfcValidate(
|
|
|
73
78
|
};
|
|
74
79
|
}
|
|
75
80
|
|
|
76
|
-
|
|
81
|
+
// RFC-1489: the corpus map carries frontmatter only — referential rules never
|
|
82
|
+
// read non-target bodies. Full `parsed` (with body) exists only for targets.
|
|
83
|
+
const allParsed: Map<string, RfcCorpusEntry> = new Map();
|
|
77
84
|
const allParsedByFile: Map<string, { fileName: string; parsed: ParsedRfc }> = new Map();
|
|
78
85
|
|
|
79
86
|
const violations: RfcValidationViolation[] = [];
|
|
@@ -90,16 +97,21 @@ export async function runRfcValidate(
|
|
|
90
97
|
violations.push({ rfcId, file, rule, message, severity });
|
|
91
98
|
}
|
|
92
99
|
|
|
100
|
+
const targetSet = new Set(filesToValidate);
|
|
93
101
|
for (const f of allFiles) {
|
|
94
|
-
const result =
|
|
102
|
+
const result = targetSet.has(f)
|
|
103
|
+
? await readAndParseRfc(rfcDirPath, f)
|
|
104
|
+
: await readRfcFrontmatter(rfcDirPath, f);
|
|
95
105
|
if (result) {
|
|
96
106
|
if ("error" in result) {
|
|
97
107
|
checkFrontmatterYamlParse(f, result, addViolation);
|
|
98
108
|
continue;
|
|
99
109
|
}
|
|
100
110
|
const id = String(result.parsed.frontmatter["id"] ?? "");
|
|
101
|
-
allParsed.set(id, { fileName: f,
|
|
102
|
-
|
|
111
|
+
allParsed.set(id, { fileName: f, frontmatter: result.parsed.frontmatter });
|
|
112
|
+
if (targetSet.has(f)) {
|
|
113
|
+
allParsedByFile.set(f, { fileName: f, parsed: result.parsed });
|
|
114
|
+
}
|
|
103
115
|
}
|
|
104
116
|
}
|
|
105
117
|
|
package/os/rfc/index.ts
CHANGED
|
@@ -12,6 +12,9 @@ Mechanical v1 to v2 header migration across the workspace: 942 files rewritten
|
|
|
12
12
|
<item>RFC-1097: sweep — werkstatt-engine clean
|
|
13
13
|
|
|
14
14
|
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>
|
|
15
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
16
|
+
|
|
17
|
+
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>
|
|
15
18
|
</CHANGE_SUMMARY>
|
|
16
19
|
*/
|
|
17
20
|
|
|
@@ -20,11 +23,13 @@ export {
|
|
|
20
23
|
listRfcFiles,
|
|
21
24
|
parseRfcFile,
|
|
22
25
|
readAndParseRfc,
|
|
26
|
+
readRfcFrontmatter,
|
|
23
27
|
rfcFileMatchesId,
|
|
24
28
|
getRfcStatusById,
|
|
25
29
|
loadRfcStatusMap,
|
|
26
30
|
type ParsedRfc,
|
|
27
31
|
type ReadAndParseRfcResult,
|
|
32
|
+
type RfcCorpusEntry,
|
|
28
33
|
} from "./frontmatter-io.ts";
|
|
29
34
|
export {
|
|
30
35
|
runRfcList,
|
|
@@ -34,7 +39,14 @@ export {
|
|
|
34
39
|
runRfcCheck,
|
|
35
40
|
} from "./handlers.ts";
|
|
36
41
|
export { runRfcImplementStamp } from "./handlers/implement-stamp.ts";
|
|
37
|
-
export {
|
|
42
|
+
export {
|
|
43
|
+
runRfcAcceptanceRun,
|
|
44
|
+
runProbe,
|
|
45
|
+
runProbeSet,
|
|
46
|
+
validateAcceptanceShape,
|
|
47
|
+
type ProbeSetOptions,
|
|
48
|
+
type ProbeSetResult,
|
|
49
|
+
} from "./acceptance.ts";
|
|
38
50
|
export { runRfcVerificationEmit, buildEvidenceEnvelope } from "./verification-evidence.ts";
|
|
39
51
|
export { runRfcDnaTraceValidate, runRfcDnaTraceGenerate, buildDnaTrace } from "./dna-trace.ts";
|
|
40
52
|
export type { DnaTraceEntry, DnaTraceResult } from "./dna-trace.ts";
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>RFC-1489: planner + executor for batched `test` acceptance probes — groups same-bound test probes between run/page/proof barriers into one instrumented Vitest run and attributes per declared (file, testName).</purpose>
|
|
4
|
+
<non-goals>
|
|
5
|
+
<item>Does not execute non-test probes — callers route those through runProbe individually.</item>
|
|
6
|
+
<item>Does not write artifacts — the JSON report lands in an OS temp dir, consumed and deleted.</item>
|
|
7
|
+
</non-goals>
|
|
8
|
+
</MODULE_CONTRACT>
|
|
9
|
+
<CHANGE_SUMMARY>
|
|
10
|
+
<item>RFC-1489: probe-execution planning layer — bound-grouped Vitest batching with per-entry attribution and unverified-on-missing-slice.</item>
|
|
11
|
+
</CHANGE_SUMMARY>
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { spawn } from "../../src/utils/sync-fs.ts";
|
|
15
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
16
|
+
import { tmpdir } from "node:os";
|
|
17
|
+
import path from "node:path";
|
|
18
|
+
|
|
19
|
+
import { ambientIo as io } from "../../src/utils/io.ts";
|
|
20
|
+
import type { AcceptanceProbe, ProbeResult } from "./types.ts";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A group of `test` probes sharing one effective timeout bound between
|
|
24
|
+
* `run`/`page`/`proof` barriers executes in ONE instrumented Vitest process
|
|
25
|
+
* (`--reporter=json --outputFile`), with each declared probe attributed only
|
|
26
|
+
* to its own (file, testName) slice of the JSON report. Non-barrier probes
|
|
27
|
+
* of other kinds keep their declared positions inside a segment's span.
|
|
28
|
+
* A missing file or an unavailable report yields `unverified`, never a pass.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export interface TestProbeLike {
|
|
32
|
+
probe: "test";
|
|
33
|
+
file: string;
|
|
34
|
+
testName?: string;
|
|
35
|
+
timeoutMs?: number;
|
|
36
|
+
expect: { exitCode: number };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const isBatchableTest = (p: AcceptanceProbe): p is AcceptanceProbe & TestProbeLike =>
|
|
40
|
+
p.probe === "test";
|
|
41
|
+
|
|
42
|
+
/** Only `run`/`page`/`proof` are barriers — every other kind keeps its own
|
|
43
|
+
* declared position inside a segment's span without splitting the group. */
|
|
44
|
+
const isBarrierProbe = (p: AcceptanceProbe): boolean =>
|
|
45
|
+
p.probe === "run" || p.probe === "page" || p.probe === "proof";
|
|
46
|
+
|
|
47
|
+
export interface ProbeSegment {
|
|
48
|
+
/** Index of the segment's earliest member — its execution position. */
|
|
49
|
+
start: number;
|
|
50
|
+
/** Declared indices of the segment's test-probe members, ascending. */
|
|
51
|
+
members: number[];
|
|
52
|
+
/** Shared effective timeout bound for the segment. */
|
|
53
|
+
boundMs: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Groups declared probes into segments of `test` probes sharing one
|
|
58
|
+
* effective bound, broken only by `run`/`page`/`proof` barriers. A segment
|
|
59
|
+
* may span non-barrier probes of other kinds — those keep their own
|
|
60
|
+
* declared position while the group executes at its earliest member.
|
|
61
|
+
*/
|
|
62
|
+
export function planProbeSegments(
|
|
63
|
+
probes: AcceptanceProbe[],
|
|
64
|
+
defaultBoundMs: number,
|
|
65
|
+
): ProbeSegment[] {
|
|
66
|
+
const segments: ProbeSegment[] = [];
|
|
67
|
+
let open: ProbeSegment | undefined;
|
|
68
|
+
for (let i = 0; i < probes.length; i++) {
|
|
69
|
+
const p = probes[i]!;
|
|
70
|
+
if (isBarrierProbe(p)) {
|
|
71
|
+
open = undefined;
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (!isBatchableTest(p)) continue; // non-barrier non-test — span, no split
|
|
75
|
+
const bound = p.timeoutMs ?? defaultBoundMs;
|
|
76
|
+
if (open && open.boundMs === bound) {
|
|
77
|
+
open.members.push(i);
|
|
78
|
+
} else {
|
|
79
|
+
open = { start: i, members: [i], boundMs: bound };
|
|
80
|
+
segments.push(open);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return segments;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface VitestAssertionResult {
|
|
87
|
+
title?: string;
|
|
88
|
+
fullName?: string;
|
|
89
|
+
ancestorTitles?: string[];
|
|
90
|
+
status?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface VitestFileResult {
|
|
94
|
+
name?: string;
|
|
95
|
+
status?: string;
|
|
96
|
+
assertionResults?: VitestAssertionResult[];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
interface VitestJsonReport {
|
|
100
|
+
testResults?: VitestFileResult[];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface BatchSpawnOutcome {
|
|
104
|
+
exitCode: number | null;
|
|
105
|
+
timedOut: boolean;
|
|
106
|
+
report?: VitestJsonReport;
|
|
107
|
+
reportError?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Spawns one instrumented Vitest process for a barrier-free segment. */
|
|
111
|
+
export async function spawnBatchedVitest(
|
|
112
|
+
workspaceRoot: string,
|
|
113
|
+
files: string[],
|
|
114
|
+
boundMs: number,
|
|
115
|
+
outputFile: string,
|
|
116
|
+
): Promise<BatchSpawnOutcome> {
|
|
117
|
+
const args = [
|
|
118
|
+
"exec",
|
|
119
|
+
"vitest",
|
|
120
|
+
"run",
|
|
121
|
+
...files,
|
|
122
|
+
"--reporter=json",
|
|
123
|
+
`--outputFile=${outputFile}`,
|
|
124
|
+
// Serial file execution inside the batch spawn — per-file resource
|
|
125
|
+
// footprints stack, and parallel files inside one run re-create the
|
|
126
|
+
// memory pressure batching exists to remove (F-0029 evidence).
|
|
127
|
+
"--fileParallelism=false",
|
|
128
|
+
];
|
|
129
|
+
|
|
130
|
+
let stderrTail = "";
|
|
131
|
+
const exit = await new Promise<{ exitCode: number | null; timedOut: boolean }>((resolve) => {
|
|
132
|
+
const child = spawn("pnpm", args, {
|
|
133
|
+
cwd: workspaceRoot,
|
|
134
|
+
stdio: ["ignore", "ignore", "pipe"],
|
|
135
|
+
});
|
|
136
|
+
child.stderr?.on("data", (chunk: Buffer) => {
|
|
137
|
+
stderrTail = (stderrTail + chunk.toString()).slice(-2000);
|
|
138
|
+
});
|
|
139
|
+
let settled = false;
|
|
140
|
+
const timer = setTimeout(() => {
|
|
141
|
+
if (settled) return;
|
|
142
|
+
settled = true;
|
|
143
|
+
child.kill();
|
|
144
|
+
resolve({ exitCode: null, timedOut: true });
|
|
145
|
+
}, boundMs);
|
|
146
|
+
timer.unref?.();
|
|
147
|
+
child.on("close", (code) => {
|
|
148
|
+
if (settled) return;
|
|
149
|
+
settled = true;
|
|
150
|
+
clearTimeout(timer);
|
|
151
|
+
resolve({ exitCode: code, timedOut: false });
|
|
152
|
+
});
|
|
153
|
+
child.on("error", () => {
|
|
154
|
+
if (settled) return;
|
|
155
|
+
settled = true;
|
|
156
|
+
clearTimeout(timer);
|
|
157
|
+
resolve({ exitCode: null, timedOut: false });
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
if (exit.timedOut) return { ...exit, reportError: stderrTail || undefined };
|
|
162
|
+
|
|
163
|
+
let raw: string;
|
|
164
|
+
try {
|
|
165
|
+
raw = await io.readFile(outputFile);
|
|
166
|
+
} catch {
|
|
167
|
+
return {
|
|
168
|
+
...exit,
|
|
169
|
+
reportError: `Vitest JSON report not produced at ${outputFile}${stderrTail ? ` — stderr: ${stderrTail.trim().slice(-400)}` : ""}`,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
try {
|
|
173
|
+
return { ...exit, report: JSON.parse(raw) as VitestJsonReport };
|
|
174
|
+
} catch (e) {
|
|
175
|
+
return {
|
|
176
|
+
...exit,
|
|
177
|
+
reportError: `Vitest JSON report unparseable: ${e instanceof Error ? e.message : String(e)}`,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const normalizeReportPath = (p: string): string => path.resolve(p).split(path.sep).join("/");
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Attributes one declared test probe to its own (file, testName) slice of
|
|
186
|
+
* the Vitest JSON report. Never derives a pass from another probe's slice;
|
|
187
|
+
* absent slices yield `unverified` (RFC-1489 AC-3).
|
|
188
|
+
*/
|
|
189
|
+
export function attributeProbeResult(
|
|
190
|
+
probe: TestProbeLike,
|
|
191
|
+
workspaceRoot: string,
|
|
192
|
+
report: VitestJsonReport,
|
|
193
|
+
): ProbeResult {
|
|
194
|
+
const wantedFile = normalizeReportPath(path.join(workspaceRoot, probe.file));
|
|
195
|
+
const entry = (report.testResults ?? []).find(
|
|
196
|
+
(t) => typeof t.name === "string" && normalizeReportPath(t.name) === wantedFile,
|
|
197
|
+
);
|
|
198
|
+
const unverified = (detail: string): ProbeResult => ({
|
|
199
|
+
probe: probe as AcceptanceProbe,
|
|
200
|
+
ok: false,
|
|
201
|
+
verdict: "unverified",
|
|
202
|
+
detail,
|
|
203
|
+
});
|
|
204
|
+
if (!entry) {
|
|
205
|
+
return unverified(`file ${probe.file} absent from Vitest JSON report`);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const assertions = entry.assertionResults ?? [];
|
|
209
|
+
let matched: VitestAssertionResult[];
|
|
210
|
+
let slicePassed: boolean;
|
|
211
|
+
if (probe.testName !== undefined) {
|
|
212
|
+
matched = assertions.filter((a) => (a.fullName ?? "").includes(probe.testName!));
|
|
213
|
+
if (matched.length === 0) {
|
|
214
|
+
// Spec §4: zero matches is a base `fail` — invertible by expect, and
|
|
215
|
+
// parity with `vitest -t` exiting nonzero on a no-match run.
|
|
216
|
+
return {
|
|
217
|
+
probe: probe as AcceptanceProbe,
|
|
218
|
+
ok: false,
|
|
219
|
+
verdict: "fail",
|
|
220
|
+
detail: `no testName match in report for "${probe.testName}" in ${probe.file}`,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
slicePassed = matched.every((a) => a.status === "passed");
|
|
224
|
+
} else {
|
|
225
|
+
matched = assertions;
|
|
226
|
+
// File-level: base ok iff the file's report entry exists and status is
|
|
227
|
+
// `passed` — a skipped/pending file cannot prove its tests executed.
|
|
228
|
+
slicePassed = entry.status === "passed";
|
|
229
|
+
if (matched.length === 0 && !slicePassed && entry.status !== "failed") {
|
|
230
|
+
return unverified(`file ${probe.file} produced no assertions in Vitest report`);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const derivedExitCode = slicePassed ? 0 : 1;
|
|
235
|
+
const ok = derivedExitCode === probe.expect.exitCode;
|
|
236
|
+
return {
|
|
237
|
+
probe: probe as AcceptanceProbe,
|
|
238
|
+
ok,
|
|
239
|
+
verdict: ok ? "pass" : "fail",
|
|
240
|
+
detail: `batched: ${matched.length} assertion(s) in ${probe.file}${
|
|
241
|
+
probe.testName ? ` matching "${probe.testName}"` : ""
|
|
242
|
+
}, derived exitCode=${derivedExitCode} (expected ${probe.expect.exitCode})`,
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Executes one segment of `test` probes in a single Vitest process and
|
|
248
|
+
* returns per-index results keyed into the declared probe list. Identical
|
|
249
|
+
* probes collapse on a canonical key and fan the computed verdict out per
|
|
250
|
+
* declared position (spec §5). Spawn/report failures mark every segment
|
|
251
|
+
* probe `unverified`; a spawn timeout mirrors the legacy `timedOut` fail.
|
|
252
|
+
*/
|
|
253
|
+
export async function runBatchedTestSegment(
|
|
254
|
+
probes: AcceptanceProbe[],
|
|
255
|
+
segment: ProbeSegment,
|
|
256
|
+
workspaceRoot: string,
|
|
257
|
+
spawnFn: typeof spawnBatchedVitest = spawnBatchedVitest,
|
|
258
|
+
): Promise<Map<number, ProbeResult>> {
|
|
259
|
+
const results = new Map<number, ProbeResult>();
|
|
260
|
+
const runnable: Array<{ index: number; probe: TestProbeLike; file: string }> = [];
|
|
261
|
+
|
|
262
|
+
for (const i of segment.members) {
|
|
263
|
+
const probe = probes[i] as TestProbeLike;
|
|
264
|
+
const absFile = path.join(workspaceRoot, probe.file);
|
|
265
|
+
try {
|
|
266
|
+
const st = await io.stat(absFile);
|
|
267
|
+
if (!st.isFile) throw new Error("not a file");
|
|
268
|
+
runnable.push({ index: i, probe, file: probe.file });
|
|
269
|
+
} catch {
|
|
270
|
+
results.set(i, {
|
|
271
|
+
probe: probe as AcceptanceProbe,
|
|
272
|
+
ok: false,
|
|
273
|
+
verdict: "unverified",
|
|
274
|
+
detail: `test file ${probe.file} does not exist`,
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (runnable.length === 0) return results;
|
|
279
|
+
|
|
280
|
+
// Spec §5: a canonical key collapses identical probes — attribute once and
|
|
281
|
+
// fan the verdict out per declared position.
|
|
282
|
+
const canonicalKey = (p: TestProbeLike): string =>
|
|
283
|
+
JSON.stringify([p.file, p.testName ?? null, p.timeoutMs ?? null, p.expect.exitCode]);
|
|
284
|
+
const byKey = new Map<string, { index: number; probe: TestProbeLike }>();
|
|
285
|
+
for (const r of runnable) {
|
|
286
|
+
const key = canonicalKey(r.probe);
|
|
287
|
+
if (!byKey.has(key)) byKey.set(key, r);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const tmpDir = mkdtempSync(path.join(tmpdir(), "forge-probe-batch-"));
|
|
291
|
+
const outputFile = path.join(tmpDir, "vitest-report.json");
|
|
292
|
+
try {
|
|
293
|
+
const files = [...new Set(runnable.map((r) => r.file))];
|
|
294
|
+
const outcome = await spawnFn(workspaceRoot, files, segment.boundMs, outputFile);
|
|
295
|
+
|
|
296
|
+
if (outcome.timedOut) {
|
|
297
|
+
for (const r of runnable) {
|
|
298
|
+
results.set(r.index, {
|
|
299
|
+
probe: r.probe as AcceptanceProbe,
|
|
300
|
+
ok: false,
|
|
301
|
+
detail: `timed out after ${segment.boundMs}ms`,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
return results;
|
|
305
|
+
}
|
|
306
|
+
if (!outcome.report) {
|
|
307
|
+
for (const r of runnable) {
|
|
308
|
+
results.set(r.index, {
|
|
309
|
+
probe: r.probe as AcceptanceProbe,
|
|
310
|
+
ok: false,
|
|
311
|
+
verdict: "unverified",
|
|
312
|
+
detail: `batched report unavailable — ${outcome.reportError ?? `vitest exited ${outcome.exitCode}`}`,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
return results;
|
|
316
|
+
}
|
|
317
|
+
const computed = new Map<string, ProbeResult>();
|
|
318
|
+
for (const [key, r] of byKey) {
|
|
319
|
+
computed.set(key, attributeProbeResult(r.probe, workspaceRoot, outcome.report));
|
|
320
|
+
}
|
|
321
|
+
for (const r of runnable) {
|
|
322
|
+
const base = computed.get(canonicalKey(r.probe))!;
|
|
323
|
+
results.set(r.index, { ...base, probe: r.probe as AcceptanceProbe });
|
|
324
|
+
}
|
|
325
|
+
return results;
|
|
326
|
+
} finally {
|
|
327
|
+
rmSync(tmpDir, { recursive: true, force: true });
|
|
328
|
+
}
|
|
329
|
+
}
|
package/os/rfc/rfc.module.ts
CHANGED
|
@@ -7,14 +7,16 @@
|
|
|
7
7
|
</non-goals>
|
|
8
8
|
</MODULE_CONTRACT>
|
|
9
9
|
<CHANGE_SUMMARY>
|
|
10
|
-
<item>RFC-1467: block rfc.create on terminal-kind near-duplicates until --revisit acknowledges + V-52 validate mirror</item>
|
|
11
10
|
<item>RFC-1474: per-rule check-execution counters
|
|
12
11
|
|
|
13
12
|
Append-only counters.jsonl journaled per evaluated rule ({runId, ruleId, contract, outcome, at}; runId = commandInvocationId; outcomes pass|diagnostic|skipped|ensured; dry-run suppressed; append failures warn never fail). checks.counters.validate audits the journal against the validator inventory (COUNT-01/02); checks.counters.export projects deterministic per-rule totals (COUNT-03, generatedAt = max journal at; producer-tail tolerated). checks.contribution.report joins counters as the canonical firing source (CONTRIB-03 on absent/empty journal; coverage none|partial|complete; live effectiveCoverage positive). Validator inventory now includes every rules[]-declaring command — fail-closed gate surfaced 9 contract-declaration defects, fixed with domain contracts.</item>
|
|
14
13
|
<item>RFC-1474: check-execution counters — apply re-review findings (structural skip flag, violations extraction, Date.parse ordering, DEV-5/6)</item>
|
|
15
14
|
<item>RFC-1482: emit validation-compliant RFC skeletons and surface contract breaches at authoring time</item>
|
|
16
15
|
<item>RFC-1483: self-sufficient implement stamp — default repair pass, ordered remediation checklist, --no-repair</item>
|
|
17
|
-
<
|
|
16
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
17
|
+
|
|
18
|
+
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>
|
|
19
|
+
<history>RFC-0260, RFC-0795, RFC-1097, RFC-1173, RFC-1231, RFC-1237, RFC-1249, RFC-1271, RFC-1306, RFC-1322, RFC-1333, RFC-1351, RFC-1354, RFC-1364, RFC-1453, RFC-1458, RFC-1461, RFC-1463, RFC-1467</history>
|
|
18
20
|
</CHANGE_SUMMARY>
|
|
19
21
|
*/
|
|
20
22
|
|
|
@@ -259,6 +261,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
259
261
|
kind: "string",
|
|
260
262
|
description: "Target every RFC with this status (e.g. accepted).",
|
|
261
263
|
},
|
|
264
|
+
"no-batch": {
|
|
265
|
+
kind: "boolean",
|
|
266
|
+
description:
|
|
267
|
+
"RFC-1489: disable test-probe batching — run each probe in its own Vitest process (diagnostic escape).",
|
|
268
|
+
},
|
|
262
269
|
},
|
|
263
270
|
reads: ["docs/rfcs/**/*.md"],
|
|
264
271
|
cacheable: false,
|
|
@@ -339,6 +346,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
339
346
|
description:
|
|
340
347
|
"RFC-1453: record an operator outcome-gate waiver ({reason, by}) in emitted envelopes — set by rfc.implement.stamp, not for direct use.",
|
|
341
348
|
},
|
|
349
|
+
"no-batch": {
|
|
350
|
+
kind: "boolean",
|
|
351
|
+
description:
|
|
352
|
+
"RFC-1489: disable test-probe batching — run each probe in its own Vitest process (diagnostic escape).",
|
|
353
|
+
},
|
|
342
354
|
},
|
|
343
355
|
execute: runRfcVerificationEmit,
|
|
344
356
|
},
|
|
@@ -380,6 +392,11 @@ export async function createForgeRfcModule(): Promise<ForgeModule> {
|
|
|
380
392
|
description:
|
|
381
393
|
"Bounded parallelism across RFCs for sweep runs (default 1, capped at 16 — invalid values warn and fall back). Probe workers spawn subprocesses.",
|
|
382
394
|
},
|
|
395
|
+
"no-batch": {
|
|
396
|
+
kind: "boolean",
|
|
397
|
+
description:
|
|
398
|
+
"RFC-1489: disable test-probe batching — run each probe in its own Vitest process (diagnostic escape).",
|
|
399
|
+
},
|
|
383
400
|
},
|
|
384
401
|
execute: runRfcVerificationRefresh,
|
|
385
402
|
},
|
|
@@ -9,6 +9,9 @@ Unit tests for verification emit check covering rfc.verification.emit --check (R
|
|
|
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
|
|
|
@@ -28,6 +31,25 @@ const { mockRunProbe } = vi.hoisted(() => ({
|
|
|
28
31
|
|
|
29
32
|
vi.mock("./acceptance.ts", () => ({
|
|
30
33
|
runProbe: mockRunProbe,
|
|
34
|
+
// RFC-1489: emit drives runProbeSet — the shim preserves the per-probe
|
|
35
|
+
// mock contract so these tests observe the same probe calls as before.
|
|
36
|
+
runProbeSet: async (probes: unknown[], opts: Record<string, unknown>) => {
|
|
37
|
+
const results = [];
|
|
38
|
+
const durationsMs = [];
|
|
39
|
+
for (const p of probes) {
|
|
40
|
+
results.push(
|
|
41
|
+
await mockRunProbe(
|
|
42
|
+
p,
|
|
43
|
+
opts.workspaceRoot,
|
|
44
|
+
opts.commandRegistry,
|
|
45
|
+
opts.forgeRoot,
|
|
46
|
+
opts.outcomeSession,
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
durationsMs.push(0);
|
|
50
|
+
}
|
|
51
|
+
return { results, durationsMs };
|
|
52
|
+
},
|
|
31
53
|
}));
|
|
32
54
|
|
|
33
55
|
const PROBE = { probe: "file-exists", path: "src/index.ts", criterion: "AC-1" };
|
|
@@ -10,6 +10,9 @@ RFC-1320 unit tests for the pre-probe generated-artifact freshness gate inside r
|
|
|
10
10
|
<CHANGE_SUMMARY>
|
|
11
11
|
<item>RFC-1320: initial suite — sync-remedy, non-sync owner remedy, absent invoke, render-unavailable, fresh pass-through, no-artifact probes, emit-owned exclusion, unowned paths, unknown kind.</item>
|
|
12
12
|
<item>RFC-1320</item>
|
|
13
|
+
<item>RFC-1489: batch test probes through one instrumented Vitest run + frontmatter corpus reads
|
|
14
|
+
|
|
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>
|
|
13
16
|
</CHANGE_SUMMARY>
|
|
14
17
|
*/
|
|
15
18
|
|
|
@@ -28,6 +31,25 @@ const { mockRunProbe } = vi.hoisted(() => ({
|
|
|
28
31
|
|
|
29
32
|
vi.mock("./acceptance.ts", () => ({
|
|
30
33
|
runProbe: mockRunProbe,
|
|
34
|
+
// RFC-1489: emit drives runProbeSet — the shim preserves the per-probe
|
|
35
|
+
// mock contract so these tests observe the same probe calls as before.
|
|
36
|
+
runProbeSet: async (probes: unknown[], opts: Record<string, unknown>) => {
|
|
37
|
+
const results = [];
|
|
38
|
+
const durationsMs = [];
|
|
39
|
+
for (const p of probes) {
|
|
40
|
+
results.push(
|
|
41
|
+
await mockRunProbe(
|
|
42
|
+
p,
|
|
43
|
+
opts.workspaceRoot,
|
|
44
|
+
opts.commandRegistry,
|
|
45
|
+
opts.forgeRoot,
|
|
46
|
+
opts.outcomeSession,
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
durationsMs.push(0);
|
|
50
|
+
}
|
|
51
|
+
return { results, durationsMs };
|
|
52
|
+
},
|
|
31
53
|
}));
|
|
32
54
|
|
|
33
55
|
const MANIFEST = "docs/command-manifest.generated.yaml";
|
|
@@ -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>[] = []) => {
|