Skip to content

Docs testing updates - #1091

Merged
squid-protocol merged 19 commits into
mainfrom
docs-testing-updates
Aug 6, 2026
Merged

squid-protocol merged 19 commits into
mainfrom
docs-testing-updates

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Aug 6, 2026 •

Copy link
Copy Markdown
Owner

Description of Structural Changes

Three independent changes landed on this branch:

1. fix(metrics): wire ecosystem-mismatch multipliers into SignalProcessor (#1053)

  • _get_context_multipliers in gitgalaxy/metrics/signal_processor.py was fully implemented but never called anywhere — confirmed dead code.
  • Wired in mismatch-only: native-context files (file language matches its folder's dominant ecosystem) stay at neutral 1.0 multipliers; only genuine architectural anomalies (e.g. C code embedded in a JS-dominant folder) get penalized via ECOSYSTEM_MISMATCH_WEIGHTS. Deliberately did not apply the NATIVE_WEIGHTS baseline repo-wide — that would re-score nearly every file in the corpus using multiplier values that had never been calibrated against real output.
  • Consumes folder_dominant_lang, metadata galaxyscope.py already computes specifically for this (comment: "INJECT THE FOLDER CONTEXT FOR THE SIGNAL PROCESSOR") but signal_processor.py never read until now.
  • memory now feeds _calc_safety via a new mem_mp param; state_mutation already had a consumer (_calc_state_flux).
  • injection has no consumer anywhere in this module (that risk lives in security_auditor.py's taint tracking) — deliberately deferred, tracked in follow-up [METRICS] Wire ECOSYSTEM_MISMATCH_WEIGHTS injection penalty into security_auditor.py taint tracking #1089.
  • Removed the now-fully-dead self.NATIVE_WEIGHTS attribute.
  • Added two regression tests in tests/core_engine/test_signal_processor.py proving mismatched files score higher and a native-context match stays a no-op vs. no folder metadata at all.
  • Verified zero golden-master drift across the 80-repo crucible corpus in both full-precision and zero-dependency modes (crucible_check.py) — confirms this is a scoped, low-blast-radius change, not a corpus-wide re-score.
  • Filed two follow-ups surfaced while investigating: [METRICS] Wire ECOSYSTEM_MISMATCH_WEIGHTS injection penalty into security_auditor.py taint tracking #1089 (the deferred injection key needs wiring into security_auditor.py) and [METRICS] SignalProcessor's CONTEXT_VIOLATION_MATRIX (archetype secrets-risk multiplier) is dead config #1090 (a separate, unrelated dead assignment — CONTEXT_VIOLATION_MATRIX — whose only key doesn't match any archetype name the engine actually produces anywhere).

2. docs: pre-authorize commits and PRs-to-main in CLAUDE.md

  • Scoped narrowly: git commit and gh pr create against main no longer require a confirmation pause in agent sessions on this repo. Merging, force-pushing, and other destructive/irreversible git operations are explicitly excluded and still require confirmation every time.

3. chore: remove stale docs/scratch/PR-body debris

  • Deleted 11 tracked files that had accumulated on this branch and didn't belong in the tree: LESSONS_LEARNED.md, pr_841_body.md, pr_949_body.md, pr_951_body.md, pr_body.txt, rewrite_docs.py, ruby_lessons.txt, scratch.py, scratch_regex.py, scratch_ruby.py, zig_lessons.txt (775 lines removed, no production code affected).
  • Resolved a rebase conflict against a CodeQL autofix-bot commit (ab9dcda5, "Potential fix for pull request finding 'CodeQL / Unused import'") that had touched scratch.py's imports mid-flight — kept the deletion since the file is being removed outright regardless.

4. docs: dedicated /tmp scratch directories for Claude and Antigravity

  • Repeated ad hoc scratch/debug files dropped straight into the repo root by both agents (scratch*.py, fix_*.py, pr_*_body.md, etc.) required two full manual cleanup passes on this branch alone.
  • CLAUDE.md and ANTIGRAVITY.md (agy's own project-instructions file, mirrors CLAUDE.md) now each document a dedicated, non-colliding /tmp working directory per model — /tmp/gitgalaxy-scratch/claude/ and /tmp/gitgalaxy-scratch/antigravity/ — for throwaway scripts, repro cases, and generated test artifacts that shouldn't enter the repo tree at all.
  • Added a .gitignore backstop matching the recurring filename patterns from past cleanups (scratch*.py, fix*.py, patch*.py, pr_*body*, test_*.py at repo root, etc.), anchored to repo-root only so it can't shadow legitimate nested files under gitgalaxy//tests/. Verified via git check-ignore that it catches new files matching those patterns without affecting any currently-tracked file (git ls-files confirms none match).

Testing

  • python -m pytest tests/core_engine/ -q — 394 passed, 1 xfailed.
  • python tests/tools/crucible_check.py — PASS in both full_precision and zero_dependency modes, zero output drift against the 80-repo corpus.
  • python tests/tools/audit_check.py — clean (regenerated the ruff baseline for pure line-shifts the edit caused; no new lint/type/dead-key findings).

Visual Observatory Testing

  • I tested the output JSON on GitGalaxy.io OR the Airgap Observatory.
  • Flexbox constraints, HUD elements, and 3D rendering remain intact.

N/A — this PR touches risk-scoring math and repo hygiene only; no visualization/rendering code is affected.

The Differential Scan Acknowledgement

  • I understand that my PR will be subjected to a Full Differential Scan.
  • I have provided the link to the specific repository this PR addresses so it can be tested alongside the 80-repo calibrated baseline.
  • I believe these changes will measurably improve the engine's Accuracy, Speed, Utility, or Ethos without causing regressions.

No single target repository — this fixes a general dead-code/scoring gap (#1053), not a bug surfaced by scanning one specific repo. Differential Scan already run locally via crucible_check.py against the full 80-repo calibrated corpus (see Testing above) — zero output drift in either precision mode, so no golden-master re-bless was required.

squid-protocol and others added 17 commits August 5, 2026 21:22
- Renamed `test_*_extraction_strict.py` to `test_*_extraction.py` to
  correctly match the architectural naming conventions (the `_strict`
  suffix is explicitly reserved for structural signatures like
  `branch`, `io`, etc., not the four extraction pillars).
- Updated `tests/README.md` and `tests/extraction/readme.md` to fix
  outdated filename references.
- Added explicit references to the new `sweep_redos_scaling.py` tool
  to definitively document how the 1.0s timeout ReDoS immunity is
  mathematically proven across the test suite.
# Conflicts:
#	tests/extraction/languages/test_haskell_strict.py
#	tests/extraction/languages/test_ruby_strict.py
… scala, swift, powershell, solidity, kotlin, lua

- Fixed missing syntax bindings across all 6 languages (e.g. Swift `throws`, PowerShell `hidden`/`static` methods, Lua generic types).
- Strengthened multiline limits and nested bracket guards to prevent ReDoS on closures/lambdas.
- Added hundreds of adversarial positive and negative cases to the _SIMPLE_CASES test suites.
…ck on docs-testing-updates

Removes 13 debug/scratch files that got committed alongside the real
epic #1071 hardening work instead of being folded into or discarded
before commit: test_c_scratch.py, test_go_strict_extra{,2,3,4,5}.py,
test_m4_adversarial{,2,3,4}.py, test_fortran_deep.py, test_assembly_deep.py
(all print-debugging scratch scripts, none with real pytest assertions),
plus epic_1071_notes.md / pr_description_1071.md (planning notes, not
meant to be committed files).

test_fortran_strict_patch.py was actively breaking CI's full-suite job:
a self-mutating script (module-level file write with a hardcoded local
path) that re-appended the same _FORTRAN_DEEP_CASES block to
test_fortran_strict.py every time pytest collected it -- which is how
test_fortran_strict.py ended up with 13 byte-identical duplicate blocks
(only the last was ever reachable; Python silently overwrote the name
each time). Collapsed back down to one copy.

Also runs `ruff format` on language_standards.py to clear the CI
ruff-audit failure (zero-tolerance format check).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
…standards.py

Follow-up to fa8d922 -- a git-add pathspec error silently dropped these
two files from that commit despite being part of the same cleanup pass
(the fortran_strict_patch.py deletion and the 13x-duplicate-block
collapse belong together; ruff-audit needs this format pass to go green).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
#1053)

Resolves #1053: _get_context_multipliers was fully implemented but never
called. Wires it in mismatch-only -- native-context files stay neutral
(1.0) rather than applying never-calibrated NATIVE_WEIGHTS baselines
repo-wide, so only genuine architectural anomalies (e.g. C hiding in a JS
folder) get penalized. Consumes the folder_dominant_lang metadata
galaxyscope.py already computed for this purpose but signal_processor.py
never read. memory now feeds _calc_safety; state_mutation already had a
consumer via mp_map. injection has no consumer in this module and is
deferred to #1089. Verified zero golden-master drift via crucible_check.py.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Scoped narrowly to commit/PR creation -- merging, force-pushing, and other
destructive git operations still require explicit confirmation.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Comment thread scratch.py Fixed
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

squid-protocol and others added 2 commits August 6, 2026 09:04
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Joe Esquibel <[email protected]>
@squid-protocol
squid-protocol merged commit 65c47d8 into main Aug 6, 2026
28 checks passed
@squid-protocol
squid-protocol deleted the docs-testing-updates branch August 6, 2026 13:25
squid-protocol added a commit that referenced this pull request Aug 6, 2026
…#1093)

Repeated ad hoc scratch/debug files dropped straight into the repo root
by both agents (scratch*.py, fix_*.py, pr_*_body.md, etc.) required two
full manual cleanup passes on this branch. Documents a per-model /tmp
convention in CLAUDE.md and ANTIGRAVITY.md (/tmp/gitgalaxy-scratch/claude
and /tmp/gitgalaxy-scratch/antigravity, so concurrent sessions don't
collide), plus a .gitignore backstop matching the recurring filename
patterns in case a throwaway file still lands in the tree.

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5 <[email protected]>
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.

2 participants