* test(#3523): rewrite two undetected source-greps as behavioral tests Both sites read a real shipped hook and text-searched it, and both were invisible to local/no-source-grep because the path was bound to a separate const the rule never resolves back to its literal. tests/check-update-config-dir.test.cjs carried three such reads, not the one the issue cites. All three are replaced by a harness that runs the real hooks/gsd-check-update.js under a fake HOME and observes the config dirs detectConfigDir resolved, via the env the hook hands its worker. Coverage now includes the CLAUDE_CONFIG_DIR precedence cases and the full adjacent-pair search order the deleted static grep only asserted for one pair. tests/security-prompt-injection.security.test.cjs asserted the scanner hook's SOURCE TEXT contained each canonical MARKDOWN_LINK_PATTERNS regex source. It now drives probes through the real hook and asserts the emitted ruleId, with a completeness gate so a new canonical pattern without a probe fails loudly, plus safePredicate parity the text grep never checked. No allow-test-rule marker is added. The now-false marker on check-update-config-dir.test.cjs is removed and its identity-allowlist entry pruned, which the ratchet requires. Refs #3464 * feat(#3523): emit typed findings IR from the read-injection scanner The scanner built a structured findings array internally and discarded the structure when rendering its advisory sentence, so the only thing a test could assert on was that prose. CONTRIBUTING's 'Prohibited: Raw Text Matching on Test Outputs' names that exact situation and prescribes adding the typed surface rather than matching the text. findings is now an array of {ruleId, match} records and the advisory is derived from it through a single renderFinding mapper, so the rendered text and the IR cannot drift. The array is emitted additively on hookSpecificOutput for both the advisory and blocking output shapes. The advisory string itself is unchanged, byte for byte: verified across six payload shapes (single markdown-link hit, 3+ finding HIGH, invisible unicode, unicode tag block, injection-pattern-only, mixed) by running the pristine and modified hooks against identical stdin and comparing. 28 existing assertions across four suites substring-match that string. The #3523 parity assertions now read the IR, and a new test binds the two surfaces together by asserting every MD-LINK ruleId in findings appears in the advisory and that the reported pattern count matches findings.length. Refs #3464 * docs(#3523): document the read-injection scanner output contract The scanner had no subsection under Security Hooks, only a one-line table row. Documents its trigger events, severity thresholds, skip conditions, rule ids, and the findings IR added alongside the advisory. Refs #3464 * fix(#3523): bind every finding family to the advisory, freeze rule ids Two review findings on the typed-IR commit. The parity test filtered on MD-LINK- and so bound only one of the four finding families to the rendered advisory; the other three were covered only by the pattern count, which catches a length mismatch but not wrong text. It now drives a payload producing all four families at once, asserts all four are present so it cannot silently degrade, and checks each one's expected rendering against an expectation table coded independently of the hook's own mapper. The three synthetic rule ids were written twice each — once at the push site, once in renderFinding — so a rename at one site would fall through the generic render branch with no signal. They are now a frozen RULE_IDS constant referenced from both. No string value changed; the advisory remains byte-identical across all six proof payloads. Refs #3464 * chore: pin changeset pr field to #3548 --------- Co-authored-by: sim <sim@local>
137 lines
9.2 KiB
JSON
137 lines
9.2 KiB
JSON
[
|
|
"tests/agent-classification-parity.test.cjs :: source-text-is-the-product",
|
|
"tests/agent-frontmatter.test.cjs :: source-text-is-the-product",
|
|
"tests/agent-required-reading-consistency.test.cjs :: source-text-is-the-product",
|
|
"tests/agent-skills-awareness.test.cjs :: source-text-is-the-product",
|
|
"tests/ai-evals.test.cjs :: source-text-is-the-product",
|
|
"tests/analyze-dependencies.test.cjs :: source-text-is-the-product",
|
|
"tests/anti-pattern-enforcement.test.cjs :: source-text-is-the-product",
|
|
"tests/ask-user-questions-fallback.test.cjs :: source-text-is-the-product",
|
|
"tests/audit-fix-command.test.cjs :: source-text-is-the-product",
|
|
"tests/autonomous-allowed-tools.test.cjs :: source-text-is-the-product",
|
|
"tests/autonomous-converge.test.cjs :: source-text-is-the-product",
|
|
"tests/autonomous-decomposition.test.cjs :: source-text-is-the-product",
|
|
"tests/autonomous-interactive.test.cjs :: source-text-is-the-product",
|
|
"tests/autonomous-to-flag.test.cjs :: source-text-is-the-product",
|
|
"tests/chain-flag-plan-phase.test.cjs :: source-text-is-the-product",
|
|
"tests/changeset-cli.test.cjs :: source-text-is-the-product",
|
|
"tests/claude-md.test.cjs :: source-text-is-the-product",
|
|
"tests/cleanup-branch-pruning.test.cjs :: source-text-is-the-product",
|
|
"tests/cline-install.test.cjs :: source-text-is-the-product",
|
|
"tests/cline-support.test.cjs :: source-text-is-the-product",
|
|
"tests/code-review-agent-skills.test.cjs :: source-text-is-the-product",
|
|
"tests/code-review-command.test.cjs :: source-text-is-the-product",
|
|
"tests/code-review-pipeline-regression.test.cjs :: source-text-is-the-product",
|
|
"tests/code-review.test.cjs :: source-text-is-the-product",
|
|
"tests/codebuddy-install.test.cjs :: source-text-is-the-product",
|
|
"tests/codex-config.test.cjs :: source-text-is-the-product",
|
|
"tests/command-contract.test.cjs :: source-text-is-the-product",
|
|
"tests/commands.test.cjs :: source-text-is-the-product",
|
|
"tests/config-field-docs.test.cjs :: docs-parity",
|
|
"tests/context-enrichment.test.cjs :: source-text-is-the-product",
|
|
"tests/contributor-standards.test.cjs :: source-text-is-the-product",
|
|
"tests/copilot-install.test.cjs :: integration-test-input",
|
|
"tests/cursor-hooks.test.cjs :: source-text-is-the-product",
|
|
"tests/cursor-reviewer.test.cjs :: source-text-is-the-product",
|
|
"tests/debug-session-management.test.cjs :: source-text-is-the-product",
|
|
"tests/discuss-checkpoint.test.cjs :: source-text-is-the-product",
|
|
"tests/discuss-phase-power.test.cjs :: source-text-is-the-product",
|
|
"tests/docs-parity-live-registry.test.cjs :: source-text-is-the-product",
|
|
"tests/drift-detection.test.cjs :: source-text-is-the-product",
|
|
"tests/edge-probe-docs-fixtures.test.cjs :: source-text-is-the-product",
|
|
"tests/edge-probe-planner-contract.test.cjs :: source-text-is-the-product",
|
|
"tests/edge-probe-spec-phase-contract.test.cjs :: source-text-is-the-product",
|
|
"tests/edit-phase.test.cjs :: source-text-is-the-product",
|
|
"tests/execute-phase-active-flags.test.cjs :: source-text-is-the-product",
|
|
"tests/execute-phase-step-5-5-deviation-doc.test.cjs :: source-text-is-the-product",
|
|
"tests/execute-phase-wave.test.cjs :: source-text-is-the-product",
|
|
"tests/execute-phase-worktree-artifacts.test.cjs :: source-text-is-the-product",
|
|
"tests/explore-command.test.cjs :: source-text-is-the-product",
|
|
"tests/extract-learnings.test.cjs :: source-text-is-the-product",
|
|
"tests/forensics.test.cjs :: source-text-is-the-product",
|
|
"tests/frontmatter-cli.test.cjs :: source-text-is-the-product",
|
|
"tests/gates-taxonomy.test.cjs :: source-text-is-the-product",
|
|
"tests/git-base-branch.test.cjs :: source-text-is-the-product",
|
|
"tests/gsd-check-update-worker-platform-gate.test.cjs :: structural-regression-guard",
|
|
"tests/gsd-researcher-app-aware.test.cjs :: source-text-is-the-product",
|
|
"tests/gsd-researcher-flow-diagram.test.cjs :: source-text-is-the-product",
|
|
"tests/gsd-settings-advanced.test.cjs :: source-text-is-the-product",
|
|
"tests/helpers/live-command-registry.cjs :: source-text-is-the-product",
|
|
"tests/hermes-skills-migration.test.cjs :: source-text-is-the-product",
|
|
"tests/import-command.test.cjs :: source-text-is-the-product",
|
|
"tests/ingest-docs.test.cjs :: source-text-is-the-product",
|
|
"tests/inline-plan-threshold.test.cjs :: source-text-is-the-product",
|
|
"tests/install-nested-layout.test.cjs :: source-text-is-the-product",
|
|
"tests/install-runtime-artifacts.test.cjs :: source-text-is-the-product",
|
|
"tests/intel.test.cjs :: source-text-is-the-product",
|
|
"tests/inventory-headings-countfree.test.cjs :: source-text-is-the-product",
|
|
"tests/ios-scaffold-safety.test.cjs :: source-text-is-the-product",
|
|
"tests/locking-bugs-1909-1916-1925-1927.test.cjs :: architectural-invariant",
|
|
"tests/mcp-tool-inheritance.test.cjs :: source-text-is-the-product",
|
|
"tests/milestone-summary.test.cjs :: source-text-is-the-product",
|
|
"tests/milestone.test.cjs :: source-text-is-the-product",
|
|
"tests/model-catalog-runtime-defaults.test.cjs :: source-text-is-the-product",
|
|
"tests/next-safety-gates.test.cjs :: source-text-is-the-product",
|
|
"tests/next-up-clear-order.test.cjs :: source-text-is-the-product",
|
|
"tests/no-hardcoded-home-gsd-tools.test.cjs :: source-text-is-the-product",
|
|
"tests/orphaned-hooks.test.cjs :: structural-regression-guard",
|
|
"tests/package-legitimacy-gate.test.cjs :: source-text-is-the-product",
|
|
"tests/parallel-dependent-plans.test.cjs :: source-text-is-the-product",
|
|
"tests/path-replacement.test.cjs :: source-text-is-the-product",
|
|
"tests/phase.test.cjs :: source-text-is-the-product",
|
|
"tests/phase6-capability-docs.test.cjs :: source-text-is-the-product",
|
|
"tests/phase6-capstone-conformance.test.cjs :: source-text-is-the-product",
|
|
"tests/phase6-planning-capabilities.test.cjs :: source-text-is-the-product",
|
|
"tests/plan-bounce.test.cjs :: source-text-is-the-product",
|
|
"tests/plan-phase-drift-guard.test.cjs :: source-text-is-the-product",
|
|
"tests/plan-phase-ui-redirect.test.cjs :: source-text-is-the-product",
|
|
"tests/plan-review-convergence.test.cjs :: source-text-is-the-product",
|
|
"tests/planner-decomposition.test.cjs :: source-text-is-the-product",
|
|
"tests/planner-language-regression.test.cjs :: source-text-is-the-product",
|
|
"tests/playwright-ui-verify.test.cjs :: source-text-is-the-product",
|
|
"tests/policy-160-route0-resume.test.cjs :: source-text-is-the-product",
|
|
"tests/policy-release-no-npm-self-upgrade.test.cjs :: source-text-is-the-product",
|
|
"tests/product-name-purity.test.cjs :: source-text-is-the-product",
|
|
"tests/profile-output.test.cjs :: source-text-is-the-product",
|
|
"tests/progress-forensic.test.cjs :: source-text-is-the-product",
|
|
"tests/prompt-thinning.test.cjs :: source-text-is-the-product",
|
|
"tests/qwen-skills-migration.test.cjs :: source-text-is-the-product",
|
|
"tests/read-guard.test.cjs :: source-text-is-the-product",
|
|
"tests/reapply-patches.test.cjs :: source-text-is-the-product",
|
|
"tests/reapply-verify-hunks.test.cjs :: source-text-is-the-product",
|
|
"tests/release-coverage-scope.test.cjs :: source-text-is-the-product",
|
|
"tests/release-tarball-smoke-workflow.test.cjs :: source-text-is-the-product",
|
|
"tests/release-tarball-smoke.install.test.cjs :: integration-test-input",
|
|
"tests/research-agent-profiles.test.cjs :: source-text-is-the-product",
|
|
"tests/roadmap.test.cjs :: source-text-is-the-product",
|
|
"tests/runtime-launcher-parity.test.cjs :: structural-regression-guard",
|
|
"tests/runtime-name-policy.test.cjs :: source-text-is-the-product",
|
|
"tests/scan-command.test.cjs :: source-text-is-the-product",
|
|
"tests/secret-scan-lint.security.test.cjs :: source-text-is-the-product",
|
|
"tests/secure-phase.test.cjs :: source-text-is-the-product",
|
|
"tests/security-prompt-injection.security.test.cjs :: structural-regression-guard",
|
|
"tests/security-scan.security.test.cjs :: source-text-is-the-product",
|
|
"tests/seed-scan-new-milestone.test.cjs :: source-text-is-the-product",
|
|
"tests/settings-integrations.test.cjs :: source-text-is-the-product",
|
|
"tests/settings-jsonc.test.cjs :: structural-regression-guard",
|
|
"tests/skill-frontmatter-contract.test.cjs :: source-text-is-the-product",
|
|
"tests/spawn-liveness-banner.test.cjs :: source-text-is-the-product",
|
|
"tests/state.test.cjs :: source-text-is-the-product",
|
|
"tests/subagent-timeout.test.cjs :: source-text-is-the-product",
|
|
"tests/template.test.cjs :: source-text-is-the-product",
|
|
"tests/thinking-partner.test.cjs :: source-text-is-the-product",
|
|
"tests/ultraplan-phase.test.cjs :: source-text-is-the-product",
|
|
"tests/verify-health.test.cjs :: source-text-is-the-product",
|
|
"tests/verify-test-quality.test.cjs :: source-text-is-the-product",
|
|
"tests/verify-work-auto-transition.test.cjs :: source-text-is-the-product",
|
|
"tests/windows-robustness.test.cjs :: source-text-is-the-product",
|
|
"tests/workflow-compat.test.cjs :: source-text-is-the-product",
|
|
"tests/workflow-guard-registration.test.cjs :: structural-regression-guard",
|
|
"tests/workflow-maintainer-skip.test.cjs :: source-text-is-the-product",
|
|
"tests/workflow-shell-pinning.test.cjs :: source-text-is-the-product",
|
|
"tests/workflow-size-budget.test.cjs :: source-text-is-the-product",
|
|
"tests/workspace.test.cjs :: source-text-is-the-product",
|
|
"tests/worktree-cleanup.test.cjs :: source-text-is-the-product",
|
|
"tests/worktree.test.cjs :: source-text-is-the-product"
|
|
]
|