Repository navigation
Function archetypes: down-weight def_encapsulation 0.3x for Go (Part of #5897) - #6707
Conversation
#5897) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No description provided. |
|
No description provided. |
|
PR #6707 @ a9a3604: 2 failed check(s) == shard 1 (1669449 LOC) (failure) -- real == shard 2 (1666363 LOC) (failure) -- real |
|
CI shepherd: the head of this PR (0a366f8) is not the one a maintainer labelled |
|
No description provided. |
|
No description provided. |
|
PR #6707 @ 0a366f8: 3 failed check(s) == shard 1 (1669449 LOC) (failure) -- real == shard 2 (1666363 LOC) (failure) -- real == shard 3 (1667394 LOC) (failure) -- real |
Part of #5897 (Option 2). Follow-up to #6701.
What
FUNCTION_ENCAPSULATION_LANG_WEIGHT = {"go": 0.3}inanalysis_lens.py;signal_processor.pymultiplies thelog_density_def_encapsulationfeature weight of a function by it, so Go's spelling-based encapsulation density no longer picks the function archetype. 3 hand-written files (+ regenerated golden masters).Measured (gore,
package gore, functions >= 3 LOC, current main + this change)Premise note: gore's code is
package gore(a library, onlyexample/ispackage main), so #6701's Option 1 changed nothing for it (rescan identical to before); lowercase there is real visibility morphology, which is why Option 2 was needed. The encapsulation share is now inside the ~10 point target; Compute Cores is still ~18 points under the C original, the residual is other Go-specific distribution (not encapsulation).Golden drift
Both fixtures re-blessed via
golden-lock.sh crucible_check.py --update --yes. Drift is confined to Go files' function archetypes and what aggregates them (function_archetype_distribution, composition archetype/fit, summary, GPU/SQLite/LLM snapshots); no extraction signal moved.Gates
pr_gates --fast7/7;--ratchets9/9 (0 skipped); guard tests + signal_processor + archetype_parity 368 passed. New test:test_function_archetype_down_weights_encapsulation_for_spelling_languages(go/Go down-weighted, python/c not).Class / Sibling gaps
Class: languages whose encapsulation rule counts spelling/convention rather than an explicit visibility marker, so the signal is hot per function. Members: Go (handled here). Perl: named in the issue as ledgered under visibility morphology; not measured, not in this PR (no evidence of the skew; needs a perl DOOM-like measurement). Rust: rosetta shows 3 vs 0; the rule question is unanswered (the rule vs the weight). keyword-rosetta
visibility-morphology-encapsulationGo expected counts (other repo, companion PR after #6701; the counts are signal counts, which this PR does not move).Cross-repo: no companion needed for this PR; the rosetta re-lock belongs to #6701's engine change, merge order engine first.
Remaining slices
perl/rust weight entries once measured (one line each in the table + a test row).
🤖 Generated with Claude Code