@warpgogol/forge 6.3.6 → 8.0.2
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 +47 -0
- package/README.md +2 -1
- package/bin/cli.js +6 -12
- package/bin/resolve-entry.js +24 -0
- package/dist/os/compass/comment-safety.d.ts +83 -0
- package/dist/os/compass/comment-safety.d.ts.map +1 -0
- package/dist/os/compass/comment-safety.js +305 -0
- package/dist/os/compass/comment-safety.js.map +1 -0
- package/dist/os/compass/compass.module.d.ts.map +1 -1
- package/dist/os/compass/compass.module.js +47 -4
- package/dist/os/compass/compass.module.js.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts +2 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-change-summary-handler.js +34 -10
- package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-docs-scaffold.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-docs-scaffold.js +54 -17
- package/dist/os/compass/handlers/compass-docs-scaffold.js.map +1 -1
- package/dist/os/compass/handlers/compass-header-scaffold-handler.d.ts +14 -0
- package/dist/os/compass/handlers/compass-header-scaffold-handler.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js +261 -0
- package/dist/os/compass/handlers/compass-header-scaffold-handler.js.map +1 -0
- package/dist/os/compass/handlers/compass-header-scaffold.d.ts +31 -0
- package/dist/os/compass/handlers/compass-header-scaffold.d.ts.map +1 -0
- package/dist/os/compass/handlers/compass-header-scaffold.js +739 -0
- package/dist/os/compass/handlers/compass-header-scaffold.js.map +1 -0
- package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory-handler.js +8 -4
- package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.d.ts +6 -0
- package/dist/os/compass/handlers/compass-inventory.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-inventory.js +28 -13
- package/dist/os/compass/handlers/compass-inventory.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-migrate-handler.js +12 -26
- package/dist/os/compass/handlers/compass-migrate-handler.js.map +1 -1
- package/dist/os/compass/handlers/compass-migrate.d.ts +15 -2
- package/dist/os/compass/handlers/compass-migrate.d.ts.map +1 -1
- package/dist/os/compass/handlers/compass-migrate.js +58 -20
- package/dist/os/compass/handlers/compass-migrate.js.map +1 -1
- package/dist/os/compass/handlers/git-revision.d.ts +10 -0
- package/dist/os/compass/handlers/git-revision.d.ts.map +1 -1
- package/dist/os/compass/handlers/git-revision.js +58 -4
- package/dist/os/compass/handlers/git-revision.js.map +1 -1
- package/dist/os/compass/handlers/summary-record.d.ts +20 -5
- package/dist/os/compass/handlers/summary-record.d.ts.map +1 -1
- package/dist/os/compass/handlers/summary-record.js +175 -44
- package/dist/os/compass/handlers/summary-record.js.map +1 -1
- package/dist/os/compass/index.d.ts +1 -0
- package/dist/os/compass/index.d.ts.map +1 -1
- package/dist/os/compass/index.js +2 -0
- package/dist/os/compass/index.js.map +1 -1
- package/dist/os/compass/policy.d.ts +9 -0
- package/dist/os/compass/policy.d.ts.map +1 -1
- package/dist/os/compass/policy.js +11 -2
- package/dist/os/compass/policy.js.map +1 -1
- package/dist/os/core/core.module.js +1 -1
- package/dist/os/core/handlers/package-health.d.ts.map +1 -1
- package/dist/os/core/handlers/package-health.js +1 -6
- package/dist/os/core/handlers/package-health.js.map +1 -1
- package/dist/os/queue/types.d.ts +2 -0
- package/dist/os/queue/types.d.ts.map +1 -1
- package/dist/os/queue/types.js +3 -1
- package/dist/os/queue/types.js.map +1 -1
- package/dist/os/rfc/acceptance.d.ts.map +1 -1
- package/dist/os/rfc/acceptance.js +66 -2
- package/dist/os/rfc/acceptance.js.map +1 -1
- package/dist/os/rfc/decision-log.d.ts.map +1 -1
- package/dist/os/rfc/decision-log.js +21 -3
- package/dist/os/rfc/decision-log.js.map +1 -1
- package/dist/os/rfc/dna-trace.d.ts +2 -0
- package/dist/os/rfc/dna-trace.d.ts.map +1 -1
- package/dist/os/rfc/dna-trace.js +13 -4
- package/dist/os/rfc/dna-trace.js.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts +37 -0
- package/dist/os/rfc/handlers/implement-stamp-origin.d.ts.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp-origin.js +118 -0
- package/dist/os/rfc/handlers/implement-stamp-origin.js.map +1 -0
- package/dist/os/rfc/handlers/implement-stamp.d.ts +41 -1
- package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
- package/dist/os/rfc/handlers/implement-stamp.js +645 -47
- package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts +42 -0
- package/dist/os/rfc/handlers/rfc-evidence-sync.d.ts.map +1 -0
- package/dist/os/rfc/handlers/rfc-evidence-sync.js +147 -0
- package/dist/os/rfc/handlers/rfc-evidence-sync.js.map +1 -0
- package/dist/os/rfc/handlers/validate-rules.d.ts +9 -1
- package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
- package/dist/os/rfc/handlers/validate-rules.js +71 -10
- package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
- package/dist/os/rfc/reachable-symbol.d.ts +17 -0
- package/dist/os/rfc/reachable-symbol.d.ts.map +1 -0
- package/dist/os/rfc/reachable-symbol.js +376 -0
- package/dist/os/rfc/reachable-symbol.js.map +1 -0
- package/dist/os/rfc/rfc.module.d.ts.map +1 -1
- package/dist/os/rfc/rfc.module.js +99 -10
- package/dist/os/rfc/rfc.module.js.map +1 -1
- package/dist/os/rfc/types.d.ts +112 -14
- package/dist/os/rfc/types.d.ts.map +1 -1
- package/dist/os/rfc/types.js +27 -10
- package/dist/os/rfc/types.js.map +1 -1
- package/dist/os/rfc/verification-evidence.d.ts +25 -0
- package/dist/os/rfc/verification-evidence.d.ts.map +1 -1
- package/dist/os/rfc/verification-evidence.js +244 -13
- package/dist/os/rfc/verification-evidence.js.map +1 -1
- package/dist/os/rfc/verification-origin.d.ts +58 -0
- package/dist/os/rfc/verification-origin.d.ts.map +1 -0
- package/dist/os/rfc/verification-origin.js +346 -0
- package/dist/os/rfc/verification-origin.js.map +1 -0
- package/dist/os/rfc/verification-refresh.d.ts.map +1 -1
- package/dist/os/rfc/verification-refresh.js +11 -1
- package/dist/os/rfc/verification-refresh.js.map +1 -1
- package/dist/os/rfc/verify-workspace.d.ts +23 -0
- package/dist/os/rfc/verify-workspace.d.ts.map +1 -0
- package/dist/os/rfc/verify-workspace.js +278 -0
- package/dist/os/rfc/verify-workspace.js.map +1 -0
- package/dist/os/session/handlers/metrics-rfc.d.ts.map +1 -1
- package/dist/os/session/handlers/metrics-rfc.js +3 -0
- package/dist/os/session/handlers/metrics-rfc.js.map +1 -1
- package/dist/os/spec/spec-status.d.ts.map +1 -1
- package/dist/os/spec/spec-status.js +5 -23
- package/dist/os/spec/spec-status.js.map +1 -1
- package/dist/os/spec/spec-validate.d.ts.map +1 -1
- package/dist/os/spec/spec-validate.js +30 -9
- package/dist/os/spec/spec-validate.js.map +1 -1
- package/dist/os/workflow/handlers.d.ts +0 -4
- package/dist/os/workflow/handlers.d.ts.map +1 -1
- package/dist/os/workflow/handlers.js +9 -36
- package/dist/os/workflow/handlers.js.map +1 -1
- package/dist/os/workflow/index.d.ts +2 -2
- package/dist/os/workflow/index.d.ts.map +1 -1
- package/dist/os/workflow/index.js +1 -1
- package/dist/os/workflow/index.js.map +1 -1
- package/dist/os/workflow/types.d.ts +0 -19
- package/dist/os/workflow/types.d.ts.map +1 -1
- package/dist/os/workflow/types.js +0 -2
- package/dist/os/workflow/types.js.map +1 -1
- package/dist/os/workflow/workflow.module.d.ts.map +1 -1
- package/dist/os/workflow/workflow.module.js +6 -15
- package/dist/os/workflow/workflow.module.js.map +1 -1
- package/dist/src/config/forge-config.d.ts +5 -0
- package/dist/src/config/forge-config.d.ts.map +1 -1
- package/dist/src/config/forge-config.js +5 -2
- package/dist/src/config/forge-config.js.map +1 -1
- package/dist/src/onboarding/agents-generate.js +1 -1
- package/dist/src/onboarding/doctor.js +3 -3
- package/dist/src/onboarding/doctor.js.map +1 -1
- package/dist/src/onboarding/init.js +2 -2
- package/dist/src/onboarding/nested-agents-templates.js +1 -1
- package/dist/src/onboarding/prettierignore.js +1 -1
- package/dist/src/onboarding/upgrade.js +2 -2
- package/dist/src/onboarding/workspace-discovery.js +1 -1
- package/dist/src/profiles/profile-schema.d.ts +2 -0
- package/dist/src/profiles/profile-schema.d.ts.map +1 -1
- package/dist/src/profiles/profile-schema.js +1 -0
- package/dist/src/profiles/profile-schema.js.map +1 -1
- package/dist/src/profiles/stack-profile.d.ts +1 -0
- package/dist/src/profiles/stack-profile.d.ts.map +1 -1
- package/dist/src/skill-schema.d.ts +2 -0
- package/dist/src/skill-schema.d.ts.map +1 -1
- package/dist/src/skill-schema.js +9 -1
- package/dist/src/skill-schema.js.map +1 -1
- package/dist/src/types.d.ts +23 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +2 -1
- package/dist/src/types.js.map +1 -1
- package/docs/reference/cli.md +0 -1
- package/docs/reference/programmatic-api.md +1 -1
- package/os/adr/handlers/validate.test.ts +14 -0
- package/os/compass/comment-safety.ts +331 -0
- package/os/compass/compass.module.ts +50 -4
- package/os/compass/handlers/compass-change-summary-handler.ts +41 -11
- package/os/compass/handlers/compass-docs-scaffold.ts +59 -17
- package/os/compass/handlers/compass-game-extensions.test.ts +3 -7
- package/os/compass/handlers/compass-header-scaffold-handler.ts +352 -0
- package/os/compass/handlers/compass-header-scaffold.ts +847 -0
- package/os/compass/handlers/compass-inventory-handler.ts +9 -4
- package/os/compass/handlers/compass-inventory.ts +29 -13
- package/os/compass/handlers/compass-migrate-handler.ts +13 -27
- package/os/compass/handlers/compass-migrate.ts +77 -21
- package/os/compass/handlers/git-revision.ts +59 -4
- package/os/compass/handlers/resolve-scan-root-package.test.ts +14 -0
- package/os/compass/handlers/resolve-scan-root-workpiece.test.ts +14 -0
- package/os/compass/handlers/summary-record.ts +194 -41
- package/os/compass/handlers/tests/compass-audit-plan.test.ts +6 -0
- package/os/compass/handlers/tests/compass-audit-record.test.ts +6 -0
- package/os/compass/handlers/tests/compass-audit-validate.test.ts +6 -0
- package/os/compass/handlers/tests/compass-change-summary-handler.test.ts +131 -0
- package/os/compass/handlers/tests/compass-docs-validate.test.ts +6 -0
- package/os/compass/handlers/tests/compass-header-scaffold.test.ts +896 -0
- package/os/compass/handlers/tests/compass-ledger-scope.test.ts +6 -0
- package/os/compass/handlers/tests/compass-migrate.test.ts +87 -9
- package/os/compass/handlers/tests/compass-policy.test.ts +1 -1
- package/os/compass/handlers/tests/compass-text-safety.test.ts +271 -0
- package/os/compass/handlers/tests/compass-v2-contract.test.ts +52 -3
- package/os/compass/handlers/tests/summary-record.test.ts +324 -3
- package/os/compass/index.ts +15 -0
- package/os/compass/policy.ts +27 -2
- package/os/core/core.module.ts +1 -1
- package/os/core/handlers/invariant-engine.test.ts +3 -1
- package/os/core/handlers/note-frontmatter-validate.test.ts +6 -1
- package/os/core/handlers/note-link-validate.test.ts +6 -1
- package/os/core/handlers/note-orphan-detect.test.ts +6 -1
- package/os/core/handlers/package-health.test.ts +6 -0
- package/os/core/handlers/package-health.ts +1 -6
- package/os/mission/handlers/archive.test.ts +14 -0
- package/os/naming/naming-convention.test.ts +14 -0
- package/os/queue/decision-ledger.test.ts +27 -4
- package/os/queue/queue-validate.test.ts +14 -0
- package/os/queue/types.ts +3 -1
- package/os/rfc/acceptance-reachable.test.ts +146 -0
- package/os/rfc/acceptance.test.ts +136 -0
- package/os/rfc/acceptance.ts +71 -2
- package/os/rfc/decision-log.ts +22 -4
- package/os/rfc/dna-trace.ts +17 -5
- package/os/rfc/frontmatter-io.test.ts +14 -0
- package/os/rfc/handlers/implement-stamp-acceptance-verification.test.ts +81 -0
- package/os/rfc/handlers/implement-stamp-binding.test.ts +79 -0
- package/os/rfc/handlers/implement-stamp-origin.test.ts +132 -0
- package/os/rfc/handlers/implement-stamp-origin.ts +154 -0
- package/os/rfc/handlers/implement-stamp-stale.test.ts +285 -0
- package/os/rfc/handlers/implement-stamp.ts +783 -55
- package/os/rfc/handlers/lifecycle.test.ts +14 -0
- package/os/rfc/handlers/rfc-evidence-sync.ts +221 -0
- package/os/rfc/handlers/validate-rules-rfc0997.test.ts +14 -0
- package/os/rfc/handlers/validate-rules-rfc1006.test.ts +14 -0
- package/os/rfc/handlers/validate-rules-rfc1330.test.ts +120 -0
- package/os/rfc/handlers/validate-rules-rfc1334.test.ts +65 -0
- package/os/rfc/handlers/validate-rules.test.ts +56 -0
- package/os/rfc/handlers/validate-rules.ts +101 -10
- package/os/rfc/handlers/validate.test.ts +4 -3
- package/os/rfc/reachable-symbol.ts +441 -0
- package/os/rfc/rfc-0000-template.md +21 -1
- package/os/rfc/rfc-create-concurrent.test.ts +6 -0
- package/os/rfc/rfc-create-hint.test.ts +6 -0
- package/os/rfc/rfc-read-only-no-side-effects.test.ts +6 -0
- package/os/rfc/rfc.module.ts +106 -10
- package/os/rfc/types.ts +151 -14
- package/os/rfc/verification-emit-check.test.ts +215 -0
- package/os/rfc/verification-emit-freshness.test.ts +415 -0
- package/os/rfc/verification-emit.test.ts +14 -0
- package/os/rfc/verification-evidence.ts +301 -13
- package/os/rfc/verification-normalize.test.ts +75 -0
- package/os/rfc/verification-origin.test.ts +236 -0
- package/os/rfc/verification-origin.ts +417 -0
- package/os/rfc/verification-refresh.test.ts +14 -0
- package/os/rfc/verification-refresh.ts +12 -1
- package/os/rfc/verifier/rfc-1333/imp12-binding.acceptance.test.ts +78 -0
- package/os/rfc/verifier/rfc-1333/imp12-gate.acceptance.test.ts +81 -0
- package/os/rfc/verifier/rfc-1333/skills-and-types.acceptance.test.ts +50 -0
- package/os/rfc/verifier/rfc-1333/verify-workspace.acceptance.test.ts +103 -0
- package/os/rfc/verify-workspace.test.ts +122 -0
- package/os/rfc/verify-workspace.ts +342 -0
- package/os/session/handlers/metrics-rfc.ts +3 -0
- package/os/spec/spec-status.test.ts +130 -0
- package/os/spec/spec-status.ts +5 -18
- package/os/spec/spec-validate.test.ts +76 -1
- package/os/spec/spec-validate.ts +26 -7
- package/os/workflow/handlers.ts +8 -42
- package/os/workflow/index.ts +1 -4
- package/os/workflow/types.ts +0 -22
- package/os/workflow/workflow.module.ts +6 -16
- package/package.json +1 -1
- package/skills/_shared/agent-operating-model.md +83 -0
- package/skills/_shared/fo-pipeline-conventions.md +1 -0
- package/skills/fo/fo-add-tests/SKILL.md +14 -0
- package/skills/fo/fo-fix/SKILL.md +2 -1
- package/skills/fo/fo-handoff/SKILL.md +1 -1
- package/skills/fo/fo-idea/SKILL.md +6 -3
- package/skills/fo/fo-idea-create-rfc/acceptance-criteria-standard.md +8 -0
- package/skills/fo/fo-idea-i-just-want-to-see-the-result/SKILL.md +4 -2
- package/skills/fo/fo-idea-implement/SKILL.md +68 -53
- package/skills/fo/fo-idea-plan/SKILL.md +3 -1
- package/skills/fo/fo-review/SKILL.md +12 -0
- package/skills/fo/fo-session-save/learned-principles.md +13 -0
- package/skills/fo/fo-step-commit/SKILL.md +1 -1
- package/src/bin-entry.test.ts +37 -0
- package/src/compass/contract-registry.test.ts +14 -0
- package/src/compass/types.test.ts +14 -0
- package/src/config/__tests__/resolve-terminology.test.ts +14 -0
- package/src/config/forge-config.test.ts +14 -0
- package/src/config/forge-config.ts +7 -2
- package/src/forge-module.test.ts +14 -0
- package/src/knowledge/__tests__/promote.test.ts +14 -0
- package/src/knowledge/__tests__/serialize.test.ts +14 -0
- package/src/knowledge/__tests__/sync.test.ts +4 -1
- package/src/knowledge/budgets.test.ts +14 -0
- package/src/knowledge/compact.test.ts +14 -0
- package/src/knowledge/parse.test.ts +14 -0
- package/src/knowledge/schema.test.ts +14 -0
- package/src/migration-adapters/__tests__/ignored-files.test.ts +14 -0
- package/src/migration-adapters/__tests__/registry.test.ts +14 -0
- package/src/migration-adapters/__tests__/types.test.ts +14 -0
- package/src/onboarding/__tests__/workspace-discovery.test.ts +14 -0
- package/src/onboarding/agents-generate.ts +1 -1
- package/src/onboarding/compass-docs/semantic-layer-block.test.ts +6 -0
- package/src/onboarding/create.test.ts +14 -0
- package/src/onboarding/doctor-token-check.test.ts +3 -0
- package/src/onboarding/doctor.test.ts +14 -0
- package/src/onboarding/doctor.ts +3 -3
- package/src/onboarding/init.test.ts +14 -0
- package/src/onboarding/init.ts +2 -2
- package/src/onboarding/nested-agents-templates.ts +1 -1
- package/src/onboarding/prettierignore.ts +1 -1
- package/src/onboarding/scaffold.test.ts +14 -0
- package/src/onboarding/site-workshop-profile.test.ts +3 -0
- package/src/onboarding/templates/behavioral-layer-core.md +8 -0
- package/src/onboarding/upgrade.test.ts +14 -0
- package/src/onboarding/upgrade.ts +2 -2
- package/src/onboarding/workspace-discovery.ts +1 -1
- package/src/pipeline-status.test.ts +14 -0
- package/src/plugin/forge-plugin-manifest.test.ts +14 -0
- package/src/profiles/__tests__/profile-schema.test.ts +14 -0
- package/src/profiles/__tests__/stack-profile.test.ts +14 -0
- package/src/profiles/__tests__/terminology-utils.test.ts +14 -0
- package/src/profiles/profile-schema.ts +1 -0
- package/src/skill-schema.ts +9 -1
- package/src/tests/acceptance-criteria.test.ts +14 -0
- package/src/tests/acceptance-probe-kinds.test.ts +14 -0
- package/src/tests/adr-implement-stamp.test.ts +14 -0
- package/src/tests/agents-generate-domain.test.ts +3 -0
- package/src/tests/agents-generate.test.ts +3 -0
- package/src/tests/bindings-schema.test.ts +2 -0
- package/src/tests/budgets.test.ts +14 -0
- package/src/tests/compact.test.ts +14 -0
- package/src/tests/compass-docs-flag.test.ts +6 -0
- package/src/tests/compass-docs-scaffold.test.ts +6 -0
- package/src/tests/compass-docs-validate-scope.test.ts +6 -0
- package/src/tests/contract-registry.test.ts +14 -0
- package/src/tests/create.test.ts +3 -0
- package/src/tests/discover-pack-skills.test.ts +14 -0
- package/src/tests/doctor-autonomy.test.ts +3 -0
- package/src/tests/doctor-bindings.test.ts +6 -1
- package/src/tests/doctor-dist-freshness.test.ts +26 -2
- package/src/tests/doctor-domain.test.ts +6 -1
- package/src/tests/doctor-fix.test.ts +3 -0
- package/src/tests/doctor-nested-agents.test.ts +3 -0
- package/src/tests/doctor-profile-id-known.test.ts +3 -0
- package/src/tests/doctor-skills-unmanaged.test.ts +3 -0
- package/src/tests/doctor-version-sync.test.ts +4 -1
- package/src/tests/editable-generated-region.test.ts +6 -3
- package/src/tests/exploration-handlers.test.ts +14 -0
- package/src/tests/file-size-lint.test.ts +6 -1
- package/src/tests/fixtures/agents-generate-business-before.txt +8 -0
- package/src/tests/forge-autonomy-validate.test.ts +3 -1
- package/src/tests/forge-config.test.ts +6 -1
- package/src/tests/forge-validate-compass-docs.test.ts +6 -0
- package/src/tests/fs-atomic.test.ts +14 -0
- package/src/tests/fs.test.ts +14 -0
- package/src/tests/generated-marker.test.ts +14 -0
- package/src/tests/hash.test.ts +14 -0
- package/src/tests/implement-stamp.test.ts +476 -10
- package/src/tests/init-bindings.test.ts +6 -1
- package/src/tests/knowledge-parse.test.ts +14 -0
- package/src/tests/knowledge-pbt.test.ts +14 -0
- package/src/tests/markdown-table.test.ts +6 -3
- package/src/tests/memory-compact.test.ts +3 -0
- package/src/tests/memory-scaffold.test.ts +6 -1
- package/src/tests/metrics-rfc-1053.test.ts +14 -0
- package/src/tests/migration-adapters.test.ts +3 -0
- package/src/tests/package-files.test.ts +4 -1
- package/src/tests/package-health-lint-surface.test.ts +3 -0
- package/src/tests/pinned-check.test.ts +14 -0
- package/src/tests/pinned-init.test.ts +14 -0
- package/src/tests/pinned-validate.test.ts +14 -0
- package/src/tests/plugin-manifest.test.ts +14 -0
- package/src/tests/prettierignore-manage.test.ts +3 -0
- package/src/tests/profile-schema.test.ts +6 -1
- package/src/tests/profile-validate.test.ts +6 -1
- package/src/tests/program-lease.test.ts +3 -0
- package/src/tests/program-paths-extended.test.ts +3 -0
- package/src/tests/program-paths.test.ts +3 -0
- package/src/tests/program-property.test.ts +3 -0
- package/src/tests/program-schemas.test.ts +3 -0
- package/src/tests/program-spec-node.test.ts +3 -0
- package/src/tests/promote.test.ts +14 -0
- package/src/tests/public-surface.test.ts +6 -1
- package/src/tests/registry.test.ts +14 -0
- package/src/tests/rfc-evidence-sync.test.ts +347 -0
- package/src/tests/rfc-implement-stamp-governance.test.ts +403 -0
- package/src/tests/scaffold-project.test.ts +3 -0
- package/src/tests/session-handlers.test.ts +14 -0
- package/src/tests/session-pbt.test.ts +14 -0
- package/src/tests/skill-agents-sync.test.ts +3 -4
- package/src/tests/skill-schema.test.ts +53 -0
- package/src/tests/skill-sync-marker.test.ts +3 -0
- package/src/tests/skill-validate-knowledge.test.ts +14 -0
- package/src/tests/skill-validate.test.ts +14 -0
- package/src/tests/stack-profile.test.ts +6 -1
- package/src/tests/string-utils.test.ts +14 -0
- package/src/tests/upgrade.test.ts +6 -1
- package/src/tests/werkstatt-lock.test.ts +14 -0
- package/src/tests/workspace-discovery-domain.test.ts +6 -1
- package/src/tests/workspace-discovery.test.ts +6 -1
- package/src/types.test.ts +14 -0
- package/src/types.ts +30 -1
- package/src/utils/__tests__/fs-idempotent.test.ts +17 -0
- package/src/utils/__tests__/fs-trash.test.ts +17 -0
- package/src/utils/fs-atomic.test.ts +17 -0
- package/src/utils/fs-trash-sync.test.ts +17 -0
- package/src/utils/fs.test.ts +17 -0
- package/src/utils/generated-marker.test.ts +17 -0
- package/src/utils/hash.test.ts +17 -0
- package/src/utils/string-utils.test.ts +17 -0
- package/src/validators/__tests__/note-orphan-detect.test.ts +14 -0
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>
|
|
4
|
+
Unit tests for implement stamp covering rfc.implement.stamp. It also guards the documented public contract and regression-sensitive edge cases.
|
|
5
|
+
</purpose>
|
|
6
|
+
<non-goals>
|
|
7
|
+
<item>Not a contract source of truth — the module under test owns the authoritative behavior; fixtures are minimal scaffolding only.</item>
|
|
8
|
+
</non-goals>
|
|
9
|
+
</MODULE_CONTRACT>
|
|
10
|
+
<CHANGE_SUMMARY>
|
|
11
|
+
<item>RFC-1311: Compass header sweep — declares the implement suite's contract for test-file scaffold coverage.</item>
|
|
12
|
+
<item>RFC-1310: governance-id parity guards on ecosystem.commit and rfc.implement.stamp</item>
|
|
13
|
+
<item>RFC-1322: step 4 — --check-criteria resolvable/unresolvable matrix + dry-run residual-unchecked fix</item>
|
|
14
|
+
<item>RFC-1322: fo-review fix pass — stale-envelope refresh, probes-less fail-closed, empty/dir/escape paths, line-ranges, --sync composition, fully-checked no-op</item>
|
|
15
|
+
<item>RFC-1322: evidence annotation extraction takes the last occurrence — prose mentions no longer shadow the annotation</item>
|
|
16
|
+
</CHANGE_SUMMARY>
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { describe, it, expect, beforeEach, afterEach, vi } from "vitest";
|
|
20
|
+
import { mkdtemp, rm, mkdir, writeFile, readFile, access } from "node:fs/promises";
|
|
3
21
|
import { join } from "node:path";
|
|
4
22
|
import { tmpdir } from "node:os";
|
|
5
23
|
import { execFileSync } from "node:child_process";
|
|
24
|
+
import { parse as yamlParse, stringify as yamlStringify } from "yaml";
|
|
25
|
+
|
|
26
|
+
const { mockRunProbe } = vi.hoisted(() => ({ mockRunProbe: vi.fn() }));
|
|
27
|
+
vi.mock("../../os/rfc/acceptance.ts", () => ({ runProbe: mockRunProbe }));
|
|
6
28
|
|
|
7
29
|
import { runRfcImplementStamp } from "../../os/rfc/handlers/implement-stamp.ts";
|
|
8
30
|
import type { ForgeCommandInput, ForgeRuntimeContext, ForgeLogger } from "../../src/types.ts";
|
|
@@ -184,6 +206,96 @@ async function commitAll(dir: string, message: string): Promise<string> {
|
|
|
184
206
|
return execFileSync("git", ["rev-parse", "HEAD"], { cwd: dir, timeout: 5000 }).toString().trim();
|
|
185
207
|
}
|
|
186
208
|
|
|
209
|
+
// ─── RFC-1322: --check-criteria fixtures ──────────────────────────────────────
|
|
210
|
+
|
|
211
|
+
// Post-cutoff probe-bearing fixture: AC-3 binds a file-exists probe so the
|
|
212
|
+
// emitted envelope carries a probe record the probe:AC-3 annotation resolves
|
|
213
|
+
// against; AC-1/AC-2 resolve via on-disk paths.
|
|
214
|
+
const RFC_BODY_FLAGGED = (
|
|
215
|
+
id: string,
|
|
216
|
+
overrides?: { ac1?: string; ac2?: string; ac3?: string },
|
|
217
|
+
): string => `---
|
|
218
|
+
id: ${id}
|
|
219
|
+
title: "Test RFC"
|
|
220
|
+
status: accepted
|
|
221
|
+
kind: command
|
|
222
|
+
scope: workspace
|
|
223
|
+
owners:
|
|
224
|
+
- architecture
|
|
225
|
+
reviewers:
|
|
226
|
+
- human:test
|
|
227
|
+
createdAt: 2026-10-01
|
|
228
|
+
updatedAt: 2026-10-01
|
|
229
|
+
acceptance:
|
|
230
|
+
- probe: file-exists
|
|
231
|
+
path: src/index.ts
|
|
232
|
+
criterion: AC-3
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
# ${id}: Test RFC
|
|
236
|
+
|
|
237
|
+
## Context
|
|
238
|
+
|
|
239
|
+
Test context.
|
|
240
|
+
|
|
241
|
+
## Acceptance criteria
|
|
242
|
+
|
|
243
|
+
- [ ] AC-1: test-path evidence (evidence: ${overrides?.ac1 ?? "test: src/x.test.ts"})
|
|
244
|
+
- [ ] AC-2: file-line evidence (evidence: ${overrides?.ac2 ?? "src/foo.ts:10"})
|
|
245
|
+
- [ ] AC-3: probe evidence (evidence: ${overrides?.ac3 ?? "probe:AC-3"})
|
|
246
|
+
`;
|
|
247
|
+
|
|
248
|
+
const RFC_BODY_FLAGGED_PARTIAL = `---
|
|
249
|
+
id: RFC-0101
|
|
250
|
+
title: "Test RFC"
|
|
251
|
+
status: accepted
|
|
252
|
+
kind: command
|
|
253
|
+
scope: workspace
|
|
254
|
+
owners:
|
|
255
|
+
- architecture
|
|
256
|
+
reviewers:
|
|
257
|
+
- human:test
|
|
258
|
+
createdAt: 2026-10-01
|
|
259
|
+
updatedAt: 2026-10-01
|
|
260
|
+
acceptance:
|
|
261
|
+
- probe: file-exists
|
|
262
|
+
path: src/index.ts
|
|
263
|
+
criterion: AC-1
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
# RFC-0101: Test RFC
|
|
267
|
+
|
|
268
|
+
## Acceptance criteria
|
|
269
|
+
|
|
270
|
+
- [x] AC-1: already checked (evidence: probe:AC-1)
|
|
271
|
+
- [ ] AC-2: straggler path evidence (evidence: test: src/x.test.ts)
|
|
272
|
+
- [ ] AC-3: straggler file-line evidence (evidence: src/foo.ts:10)
|
|
273
|
+
`;
|
|
274
|
+
|
|
275
|
+
function makeInputWithCriteriaFlag(
|
|
276
|
+
id: string,
|
|
277
|
+
commit: string,
|
|
278
|
+
dryRun?: boolean,
|
|
279
|
+
): ForgeCommandInput {
|
|
280
|
+
return {
|
|
281
|
+
argv: [],
|
|
282
|
+
flags: {
|
|
283
|
+
id,
|
|
284
|
+
"implementation-commit": commit,
|
|
285
|
+
"check-criteria": true,
|
|
286
|
+
...(dryRun ? { "dry-run": true } : {}),
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const evidenceEnvelopePath = (root: string, id: string) =>
|
|
292
|
+
join(root, "docs", "rfcs", "verification", `${id.toLowerCase()}.generated.yaml`);
|
|
293
|
+
|
|
294
|
+
const pathExists = async (p: string) =>
|
|
295
|
+
access(p)
|
|
296
|
+
.then(() => true)
|
|
297
|
+
.catch(() => false);
|
|
298
|
+
|
|
187
299
|
// ─── Tests ────────────────────────────────────────────────────────────────────
|
|
188
300
|
|
|
189
301
|
describe("rfc.implement.stamp", () => {
|
|
@@ -193,6 +305,7 @@ describe("rfc.implement.stamp", () => {
|
|
|
193
305
|
workspaceRoot = await mkdtemp(join(tmpdir(), "rfc-stamp-test-"));
|
|
194
306
|
await mkdir(join(workspaceRoot, "docs", "rfcs"), { recursive: true });
|
|
195
307
|
await makeGitRepo(workspaceRoot);
|
|
308
|
+
mockRunProbe.mockClear();
|
|
196
309
|
});
|
|
197
310
|
|
|
198
311
|
afterEach(async () => {
|
|
@@ -253,7 +366,7 @@ describe("rfc.implement.stamp", () => {
|
|
|
253
366
|
it("ignores uncommitted changes in unrelated files (multi-agent)", async () => {
|
|
254
367
|
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0001-test-rfc.md");
|
|
255
368
|
await writeFile(rfcFile, RFC_BODY("RFC-0001", "accepted", true));
|
|
256
|
-
const commit = await commitAll(workspaceRoot, "Implement RFC-0001");
|
|
369
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0001\n\nX-RFC: RFC-0001");
|
|
257
370
|
|
|
258
371
|
// Create uncommitted files from other agents — must NOT block stamping
|
|
259
372
|
await writeFile(join(workspaceRoot, "dirty.txt"), "dirty");
|
|
@@ -309,7 +422,7 @@ describe("rfc.implement.stamp", () => {
|
|
|
309
422
|
it("passes in dry-run mode for a valid accepted RFC", async () => {
|
|
310
423
|
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0001-test-rfc.md");
|
|
311
424
|
await writeFile(rfcFile, RFC_BODY("RFC-0001", "accepted", true));
|
|
312
|
-
const commit = await commitAll(workspaceRoot, "Implement RFC-0001");
|
|
425
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0001\n\nX-RFC: RFC-0001");
|
|
313
426
|
|
|
314
427
|
const result = await runRfcImplementStamp(
|
|
315
428
|
makeInput("RFC-0001", commit, true),
|
|
@@ -331,7 +444,7 @@ describe("rfc.implement.stamp", () => {
|
|
|
331
444
|
it("atomically stamps a valid accepted RFC to implemented", async () => {
|
|
332
445
|
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0001-test-rfc.md");
|
|
333
446
|
await writeFile(rfcFile, RFC_BODY("RFC-0001", "accepted", true));
|
|
334
|
-
const commit = await commitAll(workspaceRoot, "Implement RFC-0001");
|
|
447
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0001\n\nX-RFC: RFC-0001");
|
|
335
448
|
|
|
336
449
|
const result = await runRfcImplementStamp(
|
|
337
450
|
makeInput("RFC-0001", commit),
|
|
@@ -356,7 +469,7 @@ describe("rfc.implement.stamp", () => {
|
|
|
356
469
|
it("auto-detects the implementation commit when --implementation-commit is omitted (RFC-0756)", async () => {
|
|
357
470
|
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0001-test-rfc.md");
|
|
358
471
|
await writeFile(rfcFile, RFC_BODY("RFC-0001", "accepted", true));
|
|
359
|
-
const commit = await commitAll(workspaceRoot, "Implement RFC-0001");
|
|
472
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0001\n\nX-RFC: RFC-0001");
|
|
360
473
|
|
|
361
474
|
const result = await runRfcImplementStamp(
|
|
362
475
|
makeInputAutoDetect("RFC-0001"),
|
|
@@ -416,7 +529,10 @@ describe("rfc.implement.stamp", () => {
|
|
|
416
529
|
await writeFile(rfcFile, RFC_BODY("RFC-0001", "accepted", true));
|
|
417
530
|
await commitAll(workspaceRoot, "Implement RFC-0001 step 1");
|
|
418
531
|
await writeFile(join(workspaceRoot, "src.txt"), "step 2");
|
|
419
|
-
const secondCommit = await commitAll(
|
|
532
|
+
const secondCommit = await commitAll(
|
|
533
|
+
workspaceRoot,
|
|
534
|
+
"Implement RFC-0001 step 2\n\nX-RFC: RFC-0001",
|
|
535
|
+
);
|
|
420
536
|
|
|
421
537
|
const result = await runRfcImplementStamp(
|
|
422
538
|
makeInput("RFC-0001", secondCommit),
|
|
@@ -434,7 +550,10 @@ describe("rfc.implement.stamp", () => {
|
|
|
434
550
|
await writeFile(rfcFile, RFC_BODY("RFC-0001", "accepted", true));
|
|
435
551
|
await commitAll(workspaceRoot, "docs: audit RFC-0001");
|
|
436
552
|
await writeFile(join(workspaceRoot, "src.txt"), "impl");
|
|
437
|
-
const implCommit = await commitAll(
|
|
553
|
+
const implCommit = await commitAll(
|
|
554
|
+
workspaceRoot,
|
|
555
|
+
"implement: RFC-0001 — the change\n\nX-RFC: RFC-0001",
|
|
556
|
+
);
|
|
438
557
|
await writeFile(join(workspaceRoot, "src.txt"), "evidence");
|
|
439
558
|
await commitAll(workspaceRoot, "docs: RFC-0001 evidence sweep");
|
|
440
559
|
|
|
@@ -512,7 +631,7 @@ describe("rfc.implement.stamp", () => {
|
|
|
512
631
|
await writeFile(depFile, RFC_BODY("RFC-0001", "implemented", true));
|
|
513
632
|
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0002-main.md");
|
|
514
633
|
await writeFile(rfcFile, RFC_BODY_WITH_DEPS("RFC-0002", "accepted", true, ["RFC-0001"]));
|
|
515
|
-
const commit = await commitAll(workspaceRoot, "Implement RFC-0002");
|
|
634
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0002\n\nX-RFC: RFC-0002");
|
|
516
635
|
|
|
517
636
|
const result = await runRfcImplementStamp(
|
|
518
637
|
makeInput("RFC-0002", commit),
|
|
@@ -528,7 +647,7 @@ describe("rfc.implement.stamp", () => {
|
|
|
528
647
|
it("passes when dependsOn is absent (RFC-IMP-07)", async () => {
|
|
529
648
|
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0001-test-rfc.md");
|
|
530
649
|
await writeFile(rfcFile, RFC_BODY("RFC-0001", "accepted", true));
|
|
531
|
-
const commit = await commitAll(workspaceRoot, "Implement RFC-0001");
|
|
650
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0001\n\nX-RFC: RFC-0001");
|
|
532
651
|
|
|
533
652
|
const result = await runRfcImplementStamp(
|
|
534
653
|
makeInput("RFC-0001", commit),
|
|
@@ -540,4 +659,351 @@ describe("rfc.implement.stamp", () => {
|
|
|
540
659
|
const imp07 = result.data?.violations.find((v) => v.rule === "RFC-IMP-07");
|
|
541
660
|
expect(imp07).toBeUndefined();
|
|
542
661
|
});
|
|
662
|
+
|
|
663
|
+
// ── RFC-1322: --check-criteria ────────────────────────────────────────────
|
|
664
|
+
|
|
665
|
+
it("--check-criteria flips resolvable unchecked criteria and stamps in one pass", async () => {
|
|
666
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
667
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
668
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
669
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101"));
|
|
670
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
671
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
672
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
673
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
674
|
+
|
|
675
|
+
const result = await runRfcImplementStamp(
|
|
676
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
677
|
+
makeContext(workspaceRoot),
|
|
678
|
+
);
|
|
679
|
+
|
|
680
|
+
expect(result.exitCode).toBe(0);
|
|
681
|
+
expect(result.data?.status).toBe("pass");
|
|
682
|
+
expect(result.data?.violations).toEqual([]);
|
|
683
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual(["AC-1", "AC-2", "AC-3"]);
|
|
684
|
+
|
|
685
|
+
const content = await readFile(rfcFile, "utf-8");
|
|
686
|
+
expect(content).toContain("status: implemented");
|
|
687
|
+
expect(content).toContain("- [x] AC-1:");
|
|
688
|
+
expect(content).toContain("- [x] AC-2:");
|
|
689
|
+
expect(content).toContain("- [x] AC-3:");
|
|
690
|
+
expect(content).not.toContain("- [ ]");
|
|
691
|
+
|
|
692
|
+
// emit-if-needed produced the envelope in-process; the post-stamp re-emit
|
|
693
|
+
// then bound the implemented-state bytes.
|
|
694
|
+
expect(await pathExists(evidenceEnvelopePath(workspaceRoot, "RFC-0101"))).toBe(true);
|
|
695
|
+
expect(result.data?.data?.evidenceReEmitted).toBe(true);
|
|
696
|
+
// Two probe runs: emit-if-needed (missing envelope) + post-stamp re-emit.
|
|
697
|
+
expect(mockRunProbe.mock.calls.length).toBe(2);
|
|
698
|
+
});
|
|
699
|
+
|
|
700
|
+
it("--check-criteria flips only the stragglers on a partially-checked RFC", async () => {
|
|
701
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
702
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
703
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
704
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED_PARTIAL);
|
|
705
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
706
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
707
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
708
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
709
|
+
|
|
710
|
+
const result = await runRfcImplementStamp(
|
|
711
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
712
|
+
makeContext(workspaceRoot),
|
|
713
|
+
);
|
|
714
|
+
|
|
715
|
+
expect(result.exitCode).toBe(0);
|
|
716
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual(["AC-2", "AC-3"]);
|
|
717
|
+
|
|
718
|
+
const content = await readFile(rfcFile, "utf-8");
|
|
719
|
+
expect(content).toContain("- [x] AC-1: already checked");
|
|
720
|
+
expect(content).toContain("- [x] AC-2: straggler");
|
|
721
|
+
expect(content).toContain("- [x] AC-3: straggler");
|
|
722
|
+
expect(result.data?.data?.criteriaChecked).toBe(3);
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
it("--check-criteria skips emit-if-needed when the committed envelope is fresh", async () => {
|
|
726
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
727
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
728
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
729
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101"));
|
|
730
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
731
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
732
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
733
|
+
|
|
734
|
+
// Pre-emit a fresh envelope and commit it — emit-if-needed must NOT run
|
|
735
|
+
// again; only the post-stamp re-emit fires (one probe run after setup).
|
|
736
|
+
const { runRfcVerificationEmit } = await import("../../os/rfc/verification-evidence.ts");
|
|
737
|
+
const emitResult = await runRfcVerificationEmit(
|
|
738
|
+
{ argv: [], flags: { id: "RFC-0101" } },
|
|
739
|
+
makeContext(workspaceRoot),
|
|
740
|
+
);
|
|
741
|
+
expect(emitResult.exitCode).toBe(0);
|
|
742
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
743
|
+
mockRunProbe.mockClear();
|
|
744
|
+
|
|
745
|
+
const result = await runRfcImplementStamp(
|
|
746
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
747
|
+
makeContext(workspaceRoot),
|
|
748
|
+
);
|
|
749
|
+
|
|
750
|
+
expect(result.exitCode).toBe(0);
|
|
751
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual(["AC-1", "AC-2", "AC-3"]);
|
|
752
|
+
// One probe run only — the post-stamp re-emit; emit-if-needed shorted out.
|
|
753
|
+
expect(mockRunProbe.mock.calls.length).toBe(1);
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
it("--check-criteria dry-run writes nothing and reports the would-be flips", async () => {
|
|
757
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
758
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
759
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
760
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101"));
|
|
761
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
762
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
763
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
764
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
765
|
+
|
|
766
|
+
const result = await runRfcImplementStamp(
|
|
767
|
+
makeInputWithCriteriaFlag("RFC-0101", commit, true),
|
|
768
|
+
makeContext(workspaceRoot),
|
|
769
|
+
);
|
|
770
|
+
|
|
771
|
+
expect(result.exitCode).toBe(0);
|
|
772
|
+
expect(result.data?.status).toBe("pass");
|
|
773
|
+
// Path-form annotations resolve; the probe: one awaits the skipped emit.
|
|
774
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual(["AC-1", "AC-2"]);
|
|
775
|
+
// Machine-readable dry-run surface: pending ids + refresh intent (E1).
|
|
776
|
+
expect(result.data?.data?.criteriaPendingRefresh).toEqual(["AC-3"]);
|
|
777
|
+
expect(result.data?.data?.evidenceWouldRefresh).toBe(true);
|
|
778
|
+
|
|
779
|
+
const content = await readFile(rfcFile, "utf-8");
|
|
780
|
+
expect(content).toContain("status: accepted");
|
|
781
|
+
expect(content).toContain("- [ ] AC-1:");
|
|
782
|
+
expect(await pathExists(evidenceEnvelopePath(workspaceRoot, "RFC-0101"))).toBe(false);
|
|
783
|
+
// No probe ran at all — dry-run performs zero writes, including the emit.
|
|
784
|
+
expect(mockRunProbe.mock.calls.length).toBe(0);
|
|
785
|
+
});
|
|
786
|
+
|
|
787
|
+
it("--check-criteria refreshes a stale-hash envelope in-process instead of failing IMP-09", async () => {
|
|
788
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
789
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
790
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
791
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101"));
|
|
792
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
793
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
794
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
795
|
+
|
|
796
|
+
const { runRfcVerificationEmit } = await import("../../os/rfc/verification-evidence.ts");
|
|
797
|
+
const emitResult = await runRfcVerificationEmit(
|
|
798
|
+
{ argv: [], flags: { id: "RFC-0101" } },
|
|
799
|
+
makeContext(workspaceRoot),
|
|
800
|
+
);
|
|
801
|
+
expect(emitResult.exitCode).toBe(0);
|
|
802
|
+
await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
803
|
+
|
|
804
|
+
// Committed body edit after emission → the envelope's rfcFileHash is now
|
|
805
|
+
// stale. Without the flag the stamp would fail IMP-09; with it, the
|
|
806
|
+
// emit-if-needed pass refreshes the envelope first. The commit still
|
|
807
|
+
// carries the X-RFC trailer — it is the --implementation-commit target.
|
|
808
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101") + "\nPost-emission body edit.\n");
|
|
809
|
+
const commit = await commitAll(workspaceRoot, "chore: post-emit edit\n\nX-RFC: RFC-0101");
|
|
810
|
+
|
|
811
|
+
const result = await runRfcImplementStamp(
|
|
812
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
813
|
+
makeContext(workspaceRoot),
|
|
814
|
+
);
|
|
815
|
+
|
|
816
|
+
expect(result.exitCode).toBe(0);
|
|
817
|
+
expect(result.data?.violations).toEqual([]);
|
|
818
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual(["AC-1", "AC-2", "AC-3"]);
|
|
819
|
+
expect(result.data?.data?.evidenceReEmitted).toBe(true);
|
|
820
|
+
const stamped = await readFile(rfcFile, "utf-8");
|
|
821
|
+
expect(stamped).toContain("status: implemented");
|
|
822
|
+
expect(stamped).not.toContain("- [ ]");
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
it("--check-criteria on a fully-checked RFC stamps with an empty auto-check delta", async () => {
|
|
826
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
827
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
828
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
829
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101").replace(/- \[ \]/g, "- [x]"));
|
|
830
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
831
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
832
|
+
|
|
833
|
+
const result = await runRfcImplementStamp(
|
|
834
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
835
|
+
makeContext(workspaceRoot),
|
|
836
|
+
);
|
|
837
|
+
|
|
838
|
+
expect(result.exitCode).toBe(0);
|
|
839
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual([]);
|
|
840
|
+
const content = await readFile(rfcFile, "utf-8");
|
|
841
|
+
expect(content).toContain("status: implemented");
|
|
842
|
+
});
|
|
843
|
+
|
|
844
|
+
it("--check-criteria reports STAMP-CHECK-01 on a probes-less envelope instead of crashing", async () => {
|
|
845
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
846
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
847
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
848
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101"));
|
|
849
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
850
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
851
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
852
|
+
|
|
853
|
+
// Emit a real envelope, then strip its probes array — the object stays
|
|
854
|
+
// hash-valid (hashes cover the RFC bytes, not the probe list) so the
|
|
855
|
+
// emit-if-needed pass leaves it alone and the resolver meets `undefined`.
|
|
856
|
+
const { runRfcVerificationEmit } = await import("../../os/rfc/verification-evidence.ts");
|
|
857
|
+
await runRfcVerificationEmit(
|
|
858
|
+
{ argv: [], flags: { id: "RFC-0101" } },
|
|
859
|
+
makeContext(workspaceRoot),
|
|
860
|
+
);
|
|
861
|
+
const envPath = evidenceEnvelopePath(workspaceRoot, "RFC-0101");
|
|
862
|
+
const env = yamlParse(await readFile(envPath, "utf-8")) as Record<string, unknown>;
|
|
863
|
+
delete env["probes"];
|
|
864
|
+
await writeFile(envPath, `${yamlStringify(env)}\n`);
|
|
865
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
866
|
+
|
|
867
|
+
const result = await runRfcImplementStamp(
|
|
868
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
869
|
+
makeContext(workspaceRoot),
|
|
870
|
+
);
|
|
871
|
+
|
|
872
|
+
expect(result.exitCode).toBe(1);
|
|
873
|
+
const violation = result.data?.violations.find((v) => v.rule === "STAMP-CHECK-01");
|
|
874
|
+
expect(violation, "probes-less envelope must fail closed, not TypeError").toBeDefined();
|
|
875
|
+
expect(violation!.message).toContain("AC-3");
|
|
876
|
+
const content = await readFile(rfcFile, "utf-8");
|
|
877
|
+
expect(content).toContain("status: accepted");
|
|
878
|
+
expect(content).toContain("- [ ] AC-3:");
|
|
879
|
+
});
|
|
880
|
+
|
|
881
|
+
it("--check-criteria rejects empty and directory evidence paths (no blank-check)", async () => {
|
|
882
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
883
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
884
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
885
|
+
// `test:` resolves to "" → would stat workspaceRoot (a directory); and
|
|
886
|
+
// `file: src` names a real directory. Neither may certify a criterion.
|
|
887
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101", { ac1: "test:", ac2: "file: src" }));
|
|
888
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
889
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
890
|
+
|
|
891
|
+
const result = await runRfcImplementStamp(
|
|
892
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
893
|
+
makeContext(workspaceRoot),
|
|
894
|
+
);
|
|
895
|
+
|
|
896
|
+
expect(result.exitCode).toBe(1);
|
|
897
|
+
const violation = result.data?.violations.find((v) => v.rule === "STAMP-CHECK-01");
|
|
898
|
+
expect(violation).toBeDefined();
|
|
899
|
+
expect(violation!.message).toContain("AC-1");
|
|
900
|
+
expect(violation!.message).toContain("AC-2");
|
|
901
|
+
const content = await readFile(rfcFile, "utf-8");
|
|
902
|
+
expect(content).toContain("status: accepted");
|
|
903
|
+
});
|
|
904
|
+
|
|
905
|
+
it("--check-criteria resolves file: and bare line-range annotations", async () => {
|
|
906
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
907
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
908
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
909
|
+
await writeFile(
|
|
910
|
+
rfcFile,
|
|
911
|
+
RFC_BODY_FLAGGED("RFC-0101", {
|
|
912
|
+
ac1: "file: src/x.test.ts:1-5",
|
|
913
|
+
ac2: "src/foo.ts:1-2",
|
|
914
|
+
}),
|
|
915
|
+
);
|
|
916
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
917
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
918
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
919
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
920
|
+
|
|
921
|
+
const result = await runRfcImplementStamp(
|
|
922
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
923
|
+
makeContext(workspaceRoot),
|
|
924
|
+
);
|
|
925
|
+
|
|
926
|
+
expect(result.exitCode).toBe(0);
|
|
927
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual(["AC-1", "AC-2", "AC-3"]);
|
|
928
|
+
});
|
|
929
|
+
|
|
930
|
+
it("--check-criteria refuses evidence paths that escape the workspace root", async () => {
|
|
931
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
932
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
933
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
934
|
+
// `..` traversal reaches a real file outside the workspace — still not
|
|
935
|
+
// evidence: the resolver stays inside workspaceRoot.
|
|
936
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101", { ac1: "file: ../outside.ts" }));
|
|
937
|
+
await writeFile(join(workspaceRoot, "..", "outside.ts"), "// outside\n");
|
|
938
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
939
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
940
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
941
|
+
|
|
942
|
+
const result = await runRfcImplementStamp(
|
|
943
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
944
|
+
makeContext(workspaceRoot),
|
|
945
|
+
);
|
|
946
|
+
|
|
947
|
+
expect(result.exitCode).toBe(1);
|
|
948
|
+
const violation = result.data?.violations.find((v) => v.rule === "STAMP-CHECK-01");
|
|
949
|
+
expect(violation).toBeDefined();
|
|
950
|
+
expect(violation!.message).toContain("AC-1");
|
|
951
|
+
await rm(join(workspaceRoot, "..", "outside.ts"), { force: true });
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
it("--check-criteria uses the LAST (evidence: ...) on a line — prose mentions don't shadow it", async () => {
|
|
955
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
956
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
957
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
958
|
+
// AC-1's prose mentions the literal `(evidence: ...)` syntax before the real
|
|
959
|
+
// trailing annotation — a first-match extractor would certify `...`.
|
|
960
|
+
await writeFile(
|
|
961
|
+
rfcFile,
|
|
962
|
+
RFC_BODY_FLAGGED("RFC-0101", {
|
|
963
|
+
ac1: "test: src/x.test.ts",
|
|
964
|
+
}).replace(
|
|
965
|
+
"- [ ] AC-1: test-path evidence",
|
|
966
|
+
"- [ ] AC-1: prose mentions (evidence: ...) mid-sentence",
|
|
967
|
+
),
|
|
968
|
+
);
|
|
969
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
970
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
971
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
972
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
973
|
+
|
|
974
|
+
const result = await runRfcImplementStamp(
|
|
975
|
+
makeInputWithCriteriaFlag("RFC-0101", commit),
|
|
976
|
+
makeContext(workspaceRoot),
|
|
977
|
+
);
|
|
978
|
+
|
|
979
|
+
expect(result.exitCode).toBe(0);
|
|
980
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual(["AC-1", "AC-2", "AC-3"]);
|
|
981
|
+
const content = await readFile(rfcFile, "utf-8");
|
|
982
|
+
expect(content).toContain("- [x] AC-1: prose mentions (evidence: ...)");
|
|
983
|
+
});
|
|
984
|
+
|
|
985
|
+
it("--check-criteria composes with --sync (invoke delegation then auto-check)", async () => {
|
|
986
|
+
mockRunProbe.mockResolvedValue({ probe: {}, ok: true, detail: "exists" });
|
|
987
|
+
const rfcFile = join(workspaceRoot, "docs", "rfcs", "rfc-0101-flagged.md");
|
|
988
|
+
await mkdir(join(workspaceRoot, "src"), { recursive: true });
|
|
989
|
+
await writeFile(rfcFile, RFC_BODY_FLAGGED("RFC-0101"));
|
|
990
|
+
await writeFile(join(workspaceRoot, "src", "index.ts"), "export {};\n");
|
|
991
|
+
await writeFile(join(workspaceRoot, "src", "x.test.ts"), "// test\n");
|
|
992
|
+
await writeFile(join(workspaceRoot, "src", "foo.ts"), "// foo\n");
|
|
993
|
+
const commit = await commitAll(workspaceRoot, "Implement RFC-0101\n\nX-RFC: RFC-0101");
|
|
994
|
+
|
|
995
|
+
const invoke = vi.fn(async () => ({ exitCode: 0, ok: true, summary: "resync ok" }));
|
|
996
|
+
const input = makeInputWithCriteriaFlag("RFC-0101", commit);
|
|
997
|
+
input.flags["sync"] = true;
|
|
998
|
+
const result = await runRfcImplementStamp(input, {
|
|
999
|
+
...makeContext(workspaceRoot),
|
|
1000
|
+
invoke,
|
|
1001
|
+
});
|
|
1002
|
+
|
|
1003
|
+
expect(result.exitCode).toBe(0);
|
|
1004
|
+
expect(invoke).toHaveBeenCalledWith("rfc.evidence.sync", { id: "RFC-0101" });
|
|
1005
|
+
expect(result.data?.data?.criteriaAutoChecked).toEqual(["AC-1", "AC-2", "AC-3"]);
|
|
1006
|
+
const content = await readFile(rfcFile, "utf-8");
|
|
1007
|
+
expect(content).toContain("status: implemented");
|
|
1008
|
+
});
|
|
543
1009
|
});
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>
|
|
3
|
+
<purpose>
|
|
4
|
+
Unit tests for init bindings covering its documented public contract and regression-sensitive edge cases.
|
|
5
|
+
</purpose>
|
|
6
|
+
<non-goals>
|
|
7
|
+
<item>Not a contract source of truth — the module under test owns the authoritative behavior; fixtures are minimal scaffolding only.</item>
|
|
8
|
+
</non-goals>
|
|
4
9
|
</MODULE_CONTRACT>
|
|
5
10
|
<CHANGE_SUMMARY>
|
|
6
11
|
<item>RFC-0540: initial init binding defaults integration tests.</item>
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>
|
|
4
|
+
Unit tests for knowledge parse covering RFC-0660: knowledge file parser; RFC-0660: knowledge file serializer round-trip.
|
|
5
|
+
</purpose>
|
|
6
|
+
<non-goals>
|
|
7
|
+
<item>Not a contract source of truth — the module under test owns the authoritative behavior; fixtures are minimal scaffolding only.</item>
|
|
8
|
+
</non-goals>
|
|
9
|
+
</MODULE_CONTRACT>
|
|
10
|
+
<CHANGE_SUMMARY>
|
|
11
|
+
<item>RFC-1311: Compass header sweep — declares the knowledge suite's contract for test-file scaffold coverage.</item>
|
|
12
|
+
</CHANGE_SUMMARY>
|
|
13
|
+
*/
|
|
14
|
+
|
|
1
15
|
import { test, expect, describe } from "vitest";
|
|
2
16
|
import { parseKnowledgeFile } from "../knowledge/parse.ts";
|
|
3
17
|
import { serializeKnowledgeFile } from "../knowledge/serialize.ts";
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
<MODULE_CONTRACT>
|
|
3
|
+
<purpose>
|
|
4
|
+
Unit tests for knowledge pbt covering RFC-0660: property-based round-trip. It also guards the documented public contract and regression-sensitive edge cases.
|
|
5
|
+
</purpose>
|
|
6
|
+
<non-goals>
|
|
7
|
+
<item>Not a contract source of truth — the module under test owns the authoritative behavior; fixtures are minimal scaffolding only.</item>
|
|
8
|
+
</non-goals>
|
|
9
|
+
</MODULE_CONTRACT>
|
|
10
|
+
<CHANGE_SUMMARY>
|
|
11
|
+
<item>RFC-1311: Compass header sweep — declares the knowledge suite's contract for test-file scaffold coverage.</item>
|
|
12
|
+
</CHANGE_SUMMARY>
|
|
13
|
+
*/
|
|
14
|
+
|
|
1
15
|
import { test, expect, describe } from "vitest";
|
|
2
16
|
import { parseKnowledgeFile } from "../knowledge/parse.ts";
|
|
3
17
|
import { serializeKnowledgeFile } from "../knowledge/serialize.ts";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<purpose>
|
|
4
|
+
Unit tests for markdown table covering its documented public contract and regression-sensitive edge cases.
|
|
5
|
+
</purpose>
|
|
6
|
+
<non-goals>
|
|
7
|
+
<item>Not a contract source of truth — the module under test owns the authoritative behavior; fixtures are minimal scaffolding only.</item>
|
|
8
|
+
</non-goals>
|
|
6
9
|
</MODULE_CONTRACT>
|
|
7
10
|
<CHANGE_SUMMARY>
|
|
8
11
|
<item>RFC-1154: initial table-emitter tests + compact-separator regression guard.</item>
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
3
|
<purpose>Unit tests for forge memory.compact — mechanical MEMORY.md budget
|
|
4
4
|
enforcement via oldest-first Environment notes truncation (RFC-1151).</purpose>
|
|
5
|
+
<non-goals>
|
|
6
|
+
<item>Not a contract source of truth — the module under test owns the authoritative behavior; fixtures are minimal scaffolding only.</item>
|
|
7
|
+
</non-goals>
|
|
5
8
|
</MODULE_CONTRACT>
|
|
6
9
|
<CHANGE_SUMMARY>
|
|
7
10
|
<item>RFC-1151: initial memory.compact tests.</item>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
<MODULE_CONTRACT>
|
|
3
|
-
<purpose>
|
|
3
|
+
<purpose>
|
|
4
|
+
Unit tests for memory scaffold covering its documented public contract and regression-sensitive edge cases.
|
|
5
|
+
</purpose>
|
|
6
|
+
<non-goals>
|
|
7
|
+
<item>Not a contract source of truth — the module under test owns the authoritative behavior; fixtures are minimal scaffolding only.</item>
|
|
8
|
+
</non-goals>
|
|
4
9
|
</MODULE_CONTRACT>
|
|
5
10
|
<CHANGE_SUMMARY>
|
|
6
11
|
<item>RFC-0664: initial memory scaffold and health check tests.</item>
|