Skip to content

detector: extract every inline definition on a shared line (Fixes #7504) - #7603

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7504-20261103T1442Z
Nov 3, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7504-20261103T1442Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #7504

What

Brace-sliced detection found a definition only where it started a line (func_start is ^-anchored), so int f(){..} int g(){..} on one line recorded only f. dense_source.split_inline_definitions (reusing #7503's bounded _DENSE_DEF scan) swaps the whitespace before each later inline definition for a newline in safe_code only, same length, so every index and the line numbers (counted from code) are unchanged. _slice_by_braces calls it for DENSE_LANGS. A line is read only if it has 2+ { and at most 5,000 chars.

Class / Sibling gaps

Class: brace-sliced compiled languages (DENSE_LANGS: C, C++, Rust, Go, Java, C#, Zig, Swift, Kotlin, Scala) lose every definition after the first on a physical line. All members share the one hook; tests prove C, Rust and Java at 2, 5 and 10 per line (names, args, spans vs. the one-per-line copy), the others by mechanism only.
Sibling gaps: (1) }int g(){ with no whitespace before the definition is not split; no burned-estate program needs it. (2) Python indentation slicing and Mode A / label slicers: not a realistic one-line-pack input, unchecked; no burned-estate program. (3) JS/TS excluded on purpose (minified bundles).

Evidence

  • New tests/core_engine/test_dense_source_7504.py plus test_dense_source_7501.py: 46 pass.
  • crucible_check.py --update --yes (both legs): no drift, goldens unchanged, so ordinary files are byte-identical.
  • pr_gates --fast: 9/9 pass; --ratchets: 9 pass, 0 skipped.
  • Not checked: the three agent-habits Codex programs (not on this box), so the 30/23/20 acceptance counts and the ctags / tree-sitter comparison are unverified.
  • Plan change: no 200-char lower bound (2 per line under 200 chars split too).

Cross-repo: none.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 3, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 3, 2026 14:56
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 3, 2026 14:57
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot merged commit 0110c73 into main Nov 3, 2026
118 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/7504-20261103T1442Z branch November 3, 2026 15:09
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.

Detector extracts only the first function on a line: several definitions packed on one line lose all but the first

1 participant