Skip to content

Tighten extraction-hardening rigor + token-efficient tooling - #866

Merged
squid-protocol merged 1 commit into
mainfrom
docs/tighten-extraction-hardening-methodology
Jul 31, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
docs/tighten-extraction-hardening-methodology

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

  • Adds a Testing conventions section to CLAUDE.md documenting the tests/ no-__init__.py import gotcha (sibling helper modules need sys.path insertion, never a dotted tests.x.y import) — this is what broke CI on Extraction hardening: typescript #815/typescript, root-caused and fixed there, now written down so it isn't rediscovered per-language.
  • Documents that tests/tools/crucible_check.py --update --yes already automates the full two-venv golden-master regeneration in one call — several early sub-issues in the extraction-hardening epic (Epic: Harden the four extraction gauntlets (function/args/class/dependency) per language #813) hand-rolled venv activation before this was noticed; this saves real tokens on every future language pass (42 remaining).
  • Updates detector.py's _slice_by_braces comment: prism.py: PHP docblock/comment stripping corrupts code_stream (found via extraction-hardening epic #813) #859 (PHP prism.py corruption blocking broader Mode-B string-shielding) is now fixed via PR Fix/859 php docblock corruption #864, so broadening the js/ts-only gate is unblocked as a future audited follow-up (not done here).
  • Points to the two new reusable tools built this epic: tests/extraction/tools/verify_candidates.py (empirical case verification harness) and tests/tools/audit_check.py (bundles ruff/mypy/dead-key audits with pure-line-shift auto-classification).
  • Regenerates tests/ruff_audit_baseline.json for the detector.py comment-only line shift.

No functional/parsing behavior changes — this is methodology/tooling documentation only, gated per the Differential Scan protocol (no language_standards.py changes, so no crucible check needed).

Test plan

  • python tests/tools/audit_check.py — 0 new findings after regenerating the pure line-shift baseline entries
  • pytest tests/core_engine/ tests/extraction/ -q — 3326 passed, 1 known pre-existing tiktoken-environment failure, 1 xfailed
  • ruff format --check clean

🤖 Generated with Claude Code

Adds a "Testing conventions" section to CLAUDE.md documenting the
tests/ no-__init__.py import gotcha (sys.path insertion, not dotted
tests.x.y imports) discovered via the #815/typescript CI failure, plus
a pointer to the new tests/tools/audit_check.py bundler.

Documents in the methodology doc that crucible_check.py --update --yes
already automates the full two-venv golden-master regeneration in one
call, so future language passes don't hand-roll venv activation.

Updates detector.py's _slice_by_braces comment to reflect that #859
(the PHP prism.py corruption blocking broader Mode-B string-shielding)
is now fixed via PR #864, unblocking that gate's expansion as a future
audited follow-up.

Regenerates ruff_audit_baseline.json for the comment-only line shift.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit a45f8fb into main Jul 31, 2026
27 checks passed
@squid-protocol
squid-protocol deleted the docs/tighten-extraction-hardening-methodology branch July 31, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant