Skip to content

powershell: methods with a glued return-type bracket; script: scope-name audit fix (Part of #3303) - #6386

Merged
squid-protocol merged 3 commits into
mainfrom
expA-3303-powershell
Oct 24, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
expA-3303-powershell

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

A/B experiment arm A for #4479 (protocol docs/agents/self-scan-ab-protocol.md). Part of #3303.

Root cause

Two separate causes behind the recall drop on the 15 build scripts:

  1. Real engine gap: PowerShell class methods whose return-type bracket is glued to the name ([string]ToString() {, [array]GetTests() {) were missed. func_start and args required \s+ after the closing ]. Changed to \s* in both.
  2. Audit artifact: tree-sitter names function script:Write-Log as script:Write-Log, while the engine deliberately steps over the scope qualifier and names it Write-Log (existing, tested behaviour). The audit's _get_node_name now strips global|script|local|private: for powershell function names, so those are no longer counted as misses.

Local tree_sitter_accuracy_audit.py --lang powershell against the pinned crucible: args_exact_match 444 -> 474 of 487 comparable, no regressions, extra_functions still 0.

Class / Sibling gaps

Class: a typed-method declaration with any return-type bracket shape (simple, dotted, nested generic) x any gap between ] and the name (none, spaces, tab) x any modifier (none, hidden, static, both). The new test is parametrized over that whole grid for both func_start and args, plus false-positive guards ([int]$x = 1, [Parameter(Mandatory)], [CmdletBinding()] + param() and all four scope qualifiers. Sibling gaps left alone: remaining args count mismatches on multi-line param(...) blocks (e.g. Start-PSBuild real=20 got=0); not in this issue's scope.

Not run (cost cap for the experiment)

Golden bless, crucible_check, ratchets and the full pr_gates were NOT run. The tree-sitter baseline file was not regenerated. Ran only the powershell extraction tests (263 passed), ruff format, and the powershell tree-sitter audit.

🤖 Generated with Claude Code

@squid-protocol squid-protocol changed the title [experiment A] powershell functions missed in build scripts (Part of #4479) powershell: methods with a glued return-type bracket; script: scope-name audit fix (Part of #3303) Oct 24, 2026
@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 15:46
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 16:00
@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6386 @ 6d795c8: 2 failed check(s)

== crucible-audit (full-precision) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40108481969/job/120915032988
repro: tests/tools/box/golden-lock.sh python tests/tools/pr_gates.py --only golden
failing tests: tests/test_golden_crucible.py::test_golden_crucible_matches_baseline
errors:
⚠️ MISMATCH at /6. Parsed Files (Scanned Artifacts)/cobol/che-che4z_nist_ccvs85/Files/cobol/che-che4z_nist_ccvs85/IC2134.2.cbl/11. Scan DB Snapshot/PageRank/FAIL-ROUTINE-WRITE@277: Expected 1.9e-05, Got 1.8e-05
⚠️ MISMATCH at /6. Parsed Files (Scanned Artifacts)/cobol/che-che4z_nist_ccvs85/Files/cobol/che-che4z_nist_ccvs85/IC2134.2.cbl/11. Scan DB Snapshot/PageRank/FAIL-ROUTINE-EX@282: Expected 1.9e-05, Got 1.8e-05
⚠️ MISMATCH at /6. Parsed Files (Scanned Artifacts)/cobol/che-che4z_nist_ccvs85/Files/cobol/che-che4z_nist_ccvs85/IX1214.2.cbl/11. Scan DB Snapshot/PageRank/FAIL-ROUTINE-WRITE@612: Expected 1.9e-05, Got 1.8e-05
⚠️ MISMATCH at /6. Parsed Files (Scanned Artifacts)/cobol/che-che4z_nist_ccvs85/Files/cobol/che-che4z_nist_ccvs85/IX1214.2.cbl/11. Scan DB Snapshot/PageRank/FAIL-ROUTINE-EX@617: Expected 1.9e-05, Got 1.8e-05
FAILED tests/test_golden_crucible.py::test_golden_crucible_matches_baseline - Failed: Structural drift detected against golden_master_audit (439 differences):
##[error]Process completed with exit code 1.
log tail:
│   ├── gitgalaxy
│   ├── github-action-readme.md
│   ├── mkdocs.yml
│   ├── muninn.yml
│   ├── pyproject.toml
│   ├── scripts
│   ├── site
│   ├── templates
│   ├── tests
│   └── zizmor.yml
└── language-crucible
├── AGENTS.md
├── ANTIGRAVITY.md
├── CLAUDE.md
├── LICENSE
├── NOTICE
├── README.md
├── RELEASING.md
├── SECURITY.md
├── SOURCES.md
├── data
├── raw_output
└── tools
14 directories, 25 files
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/fb80fe95-51cc-470d-8820-971648cb32b4' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== crucible-audit (zero-dependency) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40108481969/job/120915033227
repro: tests/tools/box/golden-lock.sh python tests/tools/pr_gates.py --only golden
failing tests: tests/test_golden_crucible.py::test_golden_crucible_matches_baseline
errors:
⚠️ MISMATCH at /12. Scan Output Snapshots/LLM Brief: Expected ['# ARCHITECTURAL_BRIEF: data', '> INSTRUCTION: Deterministic Syntactic Analysis. Base architectural insights on Structural Magnitude, Extracted Signatures, and Risk overlays.',
2026-10-24 15:56:30,538 [WARNING] [GalaxyScope] ┃ (--fail-on-malware cannot fire). Rule-based threats still run. ┃
FAILED tests/test_golden_crucible.py::test_golden_crucible_matches_baseline - Failed: Structural drift detected against golden_master_zero_dep_audit (439 differences):
##[error]Process completed with exit code 1.
log tail:
│   ├── gitgalaxy
│   ├── github-action-readme.md
│   ├── mkdocs.yml
│   ├── muninn.yml
│   ├── pyproject.toml
│   ├── scripts
│   ├── site
│   ├── templates
│   ├── tests
│   └── zizmor.yml
└── language-crucible
├── AGENTS.md
├── ANTIGRAVITY.md
├── CLAUDE.md
├── LICENSE
├── NOTICE
├── README.md
├── RELEASING.md
├── SECURITY.md
├── SOURCES.md
├── data
├── raw_output
└── tools
14 directories, 25 files
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/c0c0d33b-b988-4465-998a-a0248b853d17' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 24, 2026
)

Drift is powershell/core only (+16 functions, build.psm1 hashes, Callbacks & Closures).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol squid-protocol removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 5446048 into main Oct 24, 2026
61 checks passed
@squid-protocol
squid-protocol deleted the expA-3303-powershell branch October 24, 2026 16:30
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant