Repository navigation
Description
Part of #2560 — per-language tracking for the keyword-rosetta control corpus (built for #1096). Planted intent is identical in every language, so every deviation below is measured bias vs. the 46-language median, validated in the corpus's deviation ledger. 🔴 = beyond ±50% of the cross-language median, 🟡 = ±25–50%.
Triage order (per the epic): structure detection first, then signal/keyword rules, then risk-score consequences — §3's numbers are downstream of §1–§2 and re-baseline as those fix. Cross-cutting engine issues (e.g. #2535/#2546) fix many languages at once; this issue tracks this language's residual after each cross-cutting fix lands, and closes when the language sits inside the ±25% band on every comparable metric (or every remaining deviation is ledgered as intended morphology).
1. Structure detection (fix first)
In band — no structure-level deviations.
2. Signal / keyword deviations
- 🔴
branch: 10 vs median 5 (+100%) - 🟡
io: 4 vs median 3 (+33%) - 🟡
safety: 3 vs median 2 (+50%)
3. Risk-exposure consequences (downstream)
- 🔴
risk_api_exposure: 9.63854 vs median 5.31104 (+81%) - 🔴
risk_cognitive_load: 30.1398 vs median 15.1444 (+99%) - 🔴
risk_state_flux: 34.5299 vs median 19.9999 (+73%) - 🟡
risk_documentation: 81.6549 vs median 57.1208 (+43%) - 🟡
risk_safety_score: 53.2735 vs median 37.297 (+43%)
Ledgered shapes touching powershell
| defect | type | issue | evidence | summary |
|---|---|---|---|---|
census-requires-git-tracked |
engine-semantic | — | — | GalaxyScope's census enumerates git-tracked files only; an untracked folder scans as '0 files mapped' with no per-file warning |
state-flux-branch-weighting |
engine-semantic | #2546 | b.ps1 | state_mutation is recorded x3 when branch context exists in the file ('flux' semantics, matching the state_flux column name) |
batch4-dual-keyword-overlaps |
keyword-overlap | — | — | Collective entry for batch 4's finditer-confirmed dual-rule keywords, each detailed in its language's manifest notes: agc RESUME (cleanup+branch), livecode global (globa… |
kotlin-return-in-branch |
upstream-question | #2545 | — | kotlin's branch rule counts return: every file's branch = returns + real branch keywords (main.kt 8 = 5 returns + if/else/when; files with only returns record branch 3) |
orphan-conversion-opaque-counts |
upstream-question | #2547 | (notes) | On languages without a same-file call graph the orphan census includes non-function shapes, so the orphan->api conversion count diverges from visible function counts: sh… |
string-literal-selective-shielding |
upstream-question | #2535 | b.ps1 | Keywords inside one string literal ('if eval fails, try open') count toward branch (+2), safety (+1), io (+1) but eval does NOT count toward high_risk_execution (routes … |
Decoy outcomes (file-level evidence)
- b.ps1 ·
$note = "if eval fails, try iwr"(string): if + try count branch (powershell branch includes try; try also safety +1), iwr counts io +1; $counter/$note 2 raw state tripled to 6. Ledger: string-literal-selective-shielding, state-flux-branch-weighting - c.ps1 ·
$hack_level = $level (probe_debt, no return)(code): state stays 1 (x1): probe_debt has no return and no branch keyword, so no flux context — while probe_todo's return gives c branch 1. Fifth per-function flux confirmation.
Reproduce / evidence
- Corpus folder:
data/powershell/—expected_signals.jsoncarries the shape-by-shape accounting - Gate:
GALAXYSCOPE_BIN=<venv>/bin/galaxyscope python tools/verify_language.py powershellin the corpus repo - Full context: findings_by_language.md#powershell · bias_report.md · bias chart
Activity
squid-protocol commentedon Sep 3, 2026
Status: 2🔴 / 2🟡 unexplained, 8 further out-of-band cell(s) accounted for
Generated from
docs/bias_data.json+deviation_ledger.jsonbytools/issue_status.py, using the same verdict machinerybias_report.py --gateruns on (gitgalaxy#2669 E.1), so this comment and the gate cannot disagree about what is left.Still unexplained — the work this issue tracks
dependency_densityrisk_cognitive_loadrisk_safety_scorerisk_state_fluxOut of band, but accounted for
derived — the deviation entered through an input that is itself out of band -- the same finding counted twice
avg_func_complexity— inherits branchcog_raw— inherits branchcontrol_flow_ratio— inherits branchfunc_complexity_gini— inherits branchfunc_internal_density— inherits branchmax_func_complexity— inherits branchledgered — a validated ledger entry names this language and this metric
branch— string-literal-selective-shielding, kotlin-return-in-branch, batch4-dual-keyword-overlapsstate_mutation— string-literal-selective-shielding, state-flux-branch-weighting, batch4-dual-keyword-overlapsClose criterion (gitgalaxy#2669 Batch E.4)
python tools/language_deviations.py powershellexits 1: 4 unexplained cell(s) remain. Each needs a fix, or a validated ledger entry saying why it is correct, before this issue can close.squid-protocol commentedon Sep 6, 2026
Closed 2026-09-06 as superseded by #2812 (
docs/contract_roadmap.md, decision D2). Every out-of-band cell for powershell is accounted for (the gate reads 0 unexplained) and is now tracked by cause family, not by language: the ledger entry that explains it, its cause category in keyword-rosetta'sdocs/bias_data.json["cell_categories"](echo / inherency / extraction / correlation / scoring), and the family issue #2812 lists for that cause. Live standing at any time:python tools/language_deviations.py powershellin keyword-rosetta, ordocs/findings_by_language.md#powershell.This is a change of axis, not a claim that powershell is green. The §10 capstone in
docs/language_status/powershell.mdis written when the language reads clean bylanguage_deviations.py, by whichever family PR gets it there — no longer tied to this issue.