Skip to content

Add spec 021: docs folder reorganization - #13

Merged
Chris Anderson (codemonkeychris) merged 1 commit into
mainfrom
docs/021-reorganization-spec
Apr 17, 2026
Merged

Chris Anderson (codemonkeychris) merged 1 commit into
mainfrom
docs/021-reorganization-spec

Conversation

@codemonkeychris

Copy link
Copy Markdown
Collaborator

Summary

  • Adds docs/spec/021-docs-reorganization.md proposing a four-bucket split for docs/: guide (end-user), reference (dev deep dives), specs (planning: specs + tasks + proposals), research (analysis, investigations, bugs), plus small homes for pitch and reports and a hidden _pipeline for doc-gen internals.
  • Status: Draft. No files are moved in this PR — spec only. Execution is deferred.
  • Spec documents the move map, rationale, pipeline code impact (including specific line refs in spec 013 and ai-author-skill.md), a 3-commit execution plan, and open questions.

Why now

docs/ currently mixes planning artifacts, research, end-user content, and doc-pipeline plumbing at the top level, with five loose .md/.svg files in the root. New contributors can't tell what is authoritative, what is generated, and what is scratch work.

Key decisions captured in the spec

  • output/ → guide/ — matches Rust/Vue/React convention; the folder that is the website should not read like a build artifact.
  • Pre-compiled docs stay committed. Screenshot capture needs a running WinUI host, which isn't available on hosted CI runners. Wiring up a self-hosted Windows runner is tracked as out-of-scope.
  • spec/ → specs/ with tasks/ and proposals/ nested underneath — makes the planning lifecycle (proposal → spec → tasks → archived) visible.
  • _pipeline/ prefix hides doc-generator internals (apps/, templates/) below the fold rather than moving them outside docs/.

Test plan

  • Read the spec end-to-end and confirm the move map matches the desired structure
  • Confirm the pipeline-code-impact section covers everything you know of (vs. spec 013 re-scan)
  • Decide on the open questions in section 10 before execution starts

🤖 Generated with Claude Code

Proposes splitting docs/ into guide/reference/specs/research/pitch/reports
plus a hidden _pipeline/ for doc-gen internals, so planning, research, and
end-user documentation each have an obvious home. No files are moved in
this change — spec only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codemonkeychris
Chris Anderson (codemonkeychris) merged commit c59c83e into main Apr 17, 2026
2 checks passed
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 11, 2026
Quality and self-consistency pass on the Phase-1 branch. All changes are
contained to Phase-1 surface; broader CR concerns about CS1061/CS0117 fuzzy
behavior, MSBuild-accurate loading, and per-code precision gating remain
scoped to Phase 2/3 per the spec's existing plan.

- CR #10: drop CS8602 warning in CompilationLoader by routing EmptyCompilation
  through a named factory method with explicit Array.Empty<> coalescing.
- CR #11: diagnostic regex now uses a reluctant file capture anchored on the
  (line,col): suffix so MSBuild lines with parenthesized path segments parse
  correctly. Added pipeline test.
- CR #8: TraceWriter.SanitizePath normalizes in-root absolute paths to
  project-relative (forward-slash) form so traces no longer carry
  `C:\Users\<name>\...` prefixes. Tests strengthened to assert no row is
  ever an absolute path.
- CR #13: replace misleading CS7036 tiebreak comment with accurate
  description; full Hamming-vector ranker stays a deferred follow-up per
  spec §1.5.
- CR #14: 525-run report reworded — "500-pair volume bar met, cross-agent
  bar NOT met"; Theme.get_Background note marked "fixed in this branch"
  with code reference.
- CR #2 (narrowed): tighten CS1061 factory-argument receiver check to
  require receiver IS-A factory return type only (dropped reverse
  IsAssignableFrom direction). Full AST-anchored receiver verification
  deferred to Phase-3 RuleSymbolResolver per §3.1a.
- Implementation doc deferred-follow-ups list updated to include
  receiver-anchoring (e) and Phase-2 loader/precision-gate work (f).

Verification: 98 CheckCommand unit tests pass (was 97 + new parens-path
test); MurCheck integration test passes; CS8602 warning eliminated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 11, 2026
…c-count gate) (#243)

* docs(specs/038): add MSBuild passthrough via `--` to mur check CLI

Today's CheckCommand accepts only <path> and hardcodes --nologo,
-v:m, and -p:Platform={host arch}. Without an escape hatch the only
fallback for an agent that needs to override Platform, pick a
Configuration, skip restore, or pass arbitrary -p: properties is to
drop mur check and run dotnet build directly - which discards every
benefit the spec adds.

Adds a "CLI shape and MSBuild passthrough" subsection in §8
covering: the `mur check [path] [mur-flags] [-- <msbuild args>]`
shape, default-merging rules (auto-inject only if user did not
specify), boundary semantics (bare `--` is the unambiguous
separator; unknown mur-flags error), ranker-unchanged invariant
(passthrough alters the build, not diagnostic scoring), and trace
faithfulness (record effective command line). Adds an
implementation bullet to Phase 4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(specs/038): add detailed implementation task list

Mirrors the convention from docs/specs/tasks/036-window-design-
implementation.md: phased checkboxes, "task is done only when"
gate, conventions header. Adapted for spec 038's external
dependency on spec 037's data corpus.

Adds three concepts not in earlier task lists because no other
spec needed them:

- Human Validation Gate: six-bar checklist every Tier 3 rule
  must clear before merge (frequency >=5%, count >=10, cross-
  agent reproducibility, >=3 positive fixtures, >=2 negative,
  independent reviewer signoff). Plus auto-suppression policy
  for rules whose telemetry accept-rate drops below 50%.

- Data Checkpoints A/B/C/D: staged hand-offs from spec 037's
  harness with explicit blocking relationships. A is the
  current 3-pair smoke (already landed); B/C/D gate Phase 1
  threshold tuning, Phase 3 rule authoring, and Phase 4 ranker
  training respectively.

- Eval Checkpoints EC1-EC4: 5xN batches on gpt-5.5 vs reactor-
  calc/kanban with predicted lift bands and pass criteria.
  EC1 after Tier 2 only; EC2 after deterministic ranker + 5
  rules; EC3 at V1 ship (10-15 rules); EC4 if learned ranker
  is pursued.

Quantity bars (per the user's question): 5 rules before EC2,
10-15 rules covering >=80% of fix events for V1 ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(spec-038): land Phase 0 + Phase 1 of `mur check` did-you-mean engine

Phase 0 (instrumentation, no behavior change):
- `mur check --trace <path>` writes one JSONL row per parsed diagnostic to
  <path> in addition to stdout. Schema: {ts, code, severity, file, line, col,
  msg, receiver_type?, member?, mode}. Source code text is never written;
  absolute paths outside the project root are redacted to "<external>"; rows
  are bounded to 2 KB.
- New folders src/Reactor.Cli/Check/{Suggesters,Rules}/ with README pointers
  to spec 038 §5/§6 and the Validation Gate.

Phase 1 (Tier-2 Roslyn semantic suggester):
- ISuggester contract + SymbolSuggester covering CS1061, CS0103, CS0117,
  CS1503, CS7036 against Microsoft.UI.Reactor.* symbols.
- CompilationLoader: csproj/source resolution, project.assets.json reference
  resolution, (csproj-path, file-mtime-hash) cache, symlink containment, perf
  budget cold ≤ 500 ms / warm ≤ 50 ms.
- FactoryIndex: pre-filter over Microsoft.UI.Reactor.Factories.* static
  methods with cached parameter-name arrays for named-argument suggestions.
- StringSimilarity (Jaro–Winkler) for fuzzy member-name matching.
- SuggesterOrchestrator wires the suggester into CheckCommand.Run; Tier-1
  HintFor still wins ties at the format layer (spec §9).
- MUR_TELEMETRY=1 opt-in: appends (code, suggester, confidence,
  evidence_short) to ~/.mur/telemetry/<yyyy-mm-dd>.jsonl. Fields bounded to
  256 bytes; no source text, file paths, or machine identifiers.
- Args parser recognises `--trace` and `--help`; rejects unknown flags
  rather than silently forwarding (full passthrough lands in Phase 2).

Tests:
- 66 unit tests under tests/Reactor.Tests/CheckCommandTests/ covering args
  parsing, trace schema/redaction/length cap, compilation loader, factory
  index, JaroWinkler, every suggester code path (positive + negative),
  orchestrator filtering (Reactor-touching gate), Tier-1-wins-ties, and
  telemetry opt-in/byte-bound.
- Integration smoke test exercising mur.exe end-to-end against a deliberately
  broken fixture under tests/Reactor.IntegrationTests/MurCheck/Fixtures/
  SmokeFixture/. Reactor-touching CS1061 fixture is scoped as a follow-up
  because it requires WindowsAppSDK restore.

Pause point per spec 038 task list:
- Phase 1.8 exit needs Data Checkpoint B (≥50 unique pairs from spec 037's
  harness) for per-code threshold tuning before merging to main.
- Phase 2 + 3 are blocked by Phase 1 merge / Data Checkpoint C respectively.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(specs/038): mark Phase 0 + Phase 1 complete; record harness Gap #3 blocker

- Status snapshot at the top of the task list — Phase 0/1 code-complete on
  feat/038-mur-check, not merged to main, blocked on threshold tuning.
- Phase 0 (0.1–0.5) and Phase 1 (1.1–1.7) checkboxes ticked, with one-line
  notes on the four items deferred as follow-ups (Reactor-touching
  integration fixture, perf-trait wall-time test, full Hamming-vector
  overload ranking, CS0103 return-type filter).
- Data Checkpoint A re-audit (2026-05-10): Gap #1 (receiver_type), #2
  (dedup), #4 (cosmetic) all FIXED in the new harness output. Gap #3
  (ranker negative class) still NOT fixed — all 3 ranker-labels rows are
  positive class; for 3 runs the spec expects ~30–80 rows.
- Plus a fix_kind classifier nit: ButtonElement HorizontalAlignment →
  HAlign should be renamed_member, not other (receiver type unchanged,
  member name swapped).
- Recommendation against kicking off the 50-run sweep until Gap #3 lands;
  records that Data Checkpoint B is therefore still blocked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(specs/038): unblock Data Checkpoint B; record still_present_at_run_end as Phase-4 prereq

Audit pass 2 of the 6-row ranker-labels output (2026-05-10):

- Gap #3 (ranker negative class) is now FIXED. 4 positive / 2 negative on
  addressed_by_next_fix; harness emits per-build per-diagnostic rows; three
  CS8012 emissions in run 5d5fef… recorded as three independent training
  rows, exactly per spec 037 §3 "don't dedupe across builds".
- fix_kind classifier nit partially fixed — both pairs now classify as
  renamed_member; debatable for pair 2's structural rewrite but acceptable.
- New known limitation: still_present_at_run_end is uniformly false even
  when the diagnostic IS in the final build (CS8012 timing-tail
  fingerprint quirk). Primary ranker label addressed_by_next_fix is
  unaffected; auxiliary agent_ignored is corrupted, which breaks the
  spec 038 §11 auto-suppression-telemetry hook. Tracked as a Phase-4
  prerequisite — file with harness owner before Data Checkpoint D.

Status updates:

- Status snapshot at top: 50-run sweep cleared to start.
- Data Checkpoint B: status flipped from blocked to unblocked. Added a
  step-by-step "pickup procedure for the next session" so the next agent
  can run cold once the corpus lands (audit, threshold tuning, EC1, merge).
- Data Checkpoint D: documents still_present_at_run_end as the remaining
  prerequisite before training the learned ranker.
- Phase 1.8 exit criterion points at the pickup procedure instead of the
  stale "blocked" note.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(spec-038): tune Tier-2 SymbolSuggester thresholds against 50-run corpus

Phase 1 ship-gate calibration (Data Checkpoint B). Adds per-code emit
thresholds in src/Reactor.Cli/Check/Suggesters/Thresholds.cs, refactors
SymbolSuggester so the threshold gate has a single source of truth
(SuggestRaw exposes raw confidence; Suggest gates via Thresholds.For),
and removes the now-redundant duplicate cut from SuggesterOrchestrator.

Per-code values informed by tests/Reactor.Tests/CheckCommandTests/Tuning/
which runs the suggester against fixes.jsonl. Snapshot of the first run
is in docs/specs/tasks/038-tuning-reports/2026-05-10-50run.md:
  - CS1061 → 0.80 (only firing in corpus was at conf 0.43; raised
    threshold blocks structural-rewrite false positives)
  - CS0103 → 0.75 default (2/2 firings at conf 1.00 matched)
  - CS0117 / CS1503 / CS7036 → 0.75 default (insufficient signal in
    50-pair corpus; revisit at Data Checkpoint C, 500+ pairs)

Tuning harness is gated on env var MUR_TUNING_CORPUS so it skips
cleanly when the (sibling-repo) corpus isn't available.

Phase-1 next gate: Eval Checkpoint EC1 vs. main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(specs/038): record EC1 5×N results; surface amortization-floor finding

EC1 5×N (n=5 paired rounds on gpt-5.5, round-3 prompt with reflection
ban + trust-the-suggestion + mur-check-is-the-build rules):

  kanban-variant — cost mean −24% / median −33% / CV 24% vs base 81%
                   wins 4 of 5 paired rounds; the suggestion mechanism
                   is itself a variance stabilizer.

  calc-variant   — cost mean +21% / wall mean +23%
                   real and consistent across the batch.

Diagnosis: ~5–8s per-invocation mur-check overhead does not amortize on
~150-LoC projects with no API exploration surface to skip. Validated
empirically — the prompt iterations that helped (round-2 reflection
ban, round-3 trust-mur-as-build) closed every explore-around-the-
suggestion loophole, but the floor remains.

Strict EC1 pass criterion ("tokens not regressed") fails on calc,
passes cleanly on kanban. Captured as:

  - spec 038 §11 risk row + §14 open question on a project-size /
    per-invocation-diagnostic-count gate
  - task doc EC1 results section with per-arm means/sd, paired comparisons
  - status snapshot updated; Phase 1 merge decision noted as pending

Decision options on the merge: (a) ship Phase 1 as-is and accept the
calc tax; (b) land the gate before merging. Either is product-side; this
commit only records the data and the design surface.

No code changes. SKILL.md intentionally left untouched — larger
mining sweep is running under the current SKILL.md to compare aided vs
un-aided baseline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(spec-038): scope Thresholds override to AsyncLocal to fix parallel-test race

ThresholdsTests.Each_handled_code_has_a_threshold_in_valid_range was flaking
because the tuner test (ThresholdTuningTests.Run_against_inline_one_row_corpus_produces_report)
temporarily writes Thresholds.PerCode to an all-zero map for its duration,
and xUnit's default cross-class parallelism let the validation tests observe
the zeroed state mid-tuner-run.

Switching the override channel to AsyncLocal isolates the tuner's scoped
change to its own logical thread; concurrent readers in other tests see
the immutable production defaults. Production code paths still go through
the same Thresholds.For(code) entry point — behaviour for the CLI is
unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(spec-038): land diagnostic-count gate + Data Checkpoint C calibration

Two related changes:

1. Diagnostic-count gate (spec §11 risk row, §14 #8) — resolves the EC1
   calc-vs-kanban split where ~150-LoC calc regressed +21% cost while
   kanban won −24%. `CheckCommand.ShouldEmitSuggestions` skips Tier-2
   when an invocation surfaces fewer than `--suggest-threshold` unique
   CS-prefixed diagnostics; default 3, 0 disables. Counts the same
   dedup key `EmitDiagnostics` uses.

2. Data Checkpoint C — 525-pair mining corpus from spec 037's harness
   mirrored at `docs/specs/tasks/038-tuning-reports/2026-05-11-525run-source/`
   (1,027 fixes / 1,233 ranker rows / 104 clusters; `gpt-5.5` only).
   Tuning report at `2026-05-11-525run.md`.

The empirical CS-diagnostics-per-build distribution from the corpus
(43% of builds have 1 diagnostic, 28% have 2, 28.7% have ≥ 3) confirms
T=3 is the right initial cut-line. The 525-run corpus also surfaces
that JaroWinkler fuzzy match has near-0% empirical precision on
CS1061/CS0117 against Reactor types — the agent's typical mistake is
reaching for a WinUI-style name (`.VerticalAlignment`,
`Theme.AppBackground`) whose Reactor replacement is too far in
edit-distance to find, so we pick a wrong sibling. All per-code
thresholds held; systematic fix is Phase-3 rule authoring. Top three
rule targets identified in the report.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(spec-038): record EC1 re-run results; Phase 1 cleared to merge

5×N re-run on `feat/038-mur-check` @ aaa4cce (gate enabled, default
--suggest-threshold 3), same matrix as the prior EC1 batch.

  reactor-calc-mur-check  : cost -4%  (was +21%) — PASS
  reactor-kanban-mur-check: cost -33% (was -24%) — PASS, grew the win
  First-build OK 5/5 both variant arms.

Calc neutralized; kanban win preserved and grew. Phase 1 acceptance bar
met. Spec §11 risk row + §14 #8 updated to mark the mitigation validated.

Watch-item carried into Phase 2: kanban CV widened (24% prior -> 54%
this batch) because one of five runs hit 0 firings and tracked the
long-tail base path. Gate is path-dependent on agent's exploration
order, not just the project's static shape. Below Phase-1 blocker
threshold; Phase 2 telemetry should track per-run firing counts.

No code change in this commit — eval results + spec doc updates only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(spec-038): add reference doc for `mur check` did-you-mean engine

Layered walkthrough of the system as shipped in this PR (Phase 0 + Phase 1
+ diagnostic-count gate): plain-language intro, four-tier architecture,
mining pipeline, threshold tuning, end-to-end recommendation flow, the
small-project gate, and a future-improvements section sketching Phases
2–4. Lives at docs/reference/ alongside the other developer-facing
references; points back to docs/specs/038… for decision history.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(spec-038): address CR feedback on PR #243

Addresses six review comments from Copilot reviewer on the Phase-1 PR:

1. Hoist CompilationLoader.Load to once per `mur check` invocation
   instead of once per emitted diagnostic. Even with the internal cache,
   Load() re-enumerates `.cs` files and recomputes the file-set hash on
   every call, so the prior wiring was O(diagnostics × files). Now O(1)
   per invocation via SuggesterOrchestrator.SuggestAgainst.

2. FindTreeFor suffix match required a path-separator boundary so a
   diagnostic on bare "Program.cs" no longer mis-binds to a sibling tree
   like "MyProgram.cs". Cross-platform: matches against both '/' and '\'
   prefixes since CSharpCompilation trees can carry either separator
   depending on the project's source-list. Added regression test.

3. Filter synthesized property/event accessors (get_X / set_X / add_X /
   remove_X) out of CollectStaticMembers + CollectInstanceMembers. The
   525-run calibration report flagged conf=0.88 emissions of
   `Theme.get_Background` — same hazard would surface on CS1061 against
   instance-member walks. Fixed at the source.

4. Telemetry.Truncate now enforces a true UTF-8 byte limit, not a char
   limit. Pure-ASCII content still hits the cheap fast path. New test
   covers a 200-glyph CJK string (600 bytes pre-truncation).

5. StringSimilarity header comment no longer claims "allocation-free on
   the hot path" — Jaro() allocates two bool[]s per call. Comment now
   reflects reality with a pointer to revisit via stackalloc if perf-
   trait tests show it on the hot path.

6. Drop the "`<path>` accepts a .cs file" claim from CheckArgs.HelpText
   and the CheckCommand.cs header. `dotnet build <single.cs>` doesn't
   work end-to-end so the help text was misleading. CompilationLoader
   still walks up to the nearest .csproj when seeded from a .cs file
   (tooling/test seam only).

Skipped: #6 (MurCheckSmokeTest.cs build-on-demand for mur.exe) — changes
the integration-tests CI contract and is cleanly scoped as a separate
follow-up.

Full suite: 7051/7097 pass (46 skipped — perf-trait + opt-in, unchanged).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(spec-038): adopt load-bearing framing; split Tier-3 rule classes; resolve symbol-binding

Doc-only updates across spec, task list, and reference doc to reflect the
decision that `mur check`'s did-you-mean engine is load-bearing
infrastructure for the next 1-3 years, not a token-saving stopgap base-
model improvements will erode.

Why now: Reactor will keep churning faster than models retrain, and WinUI
3 is structurally weak / cross-confused with WPF/Silverlight/WinUI 1/2 in
training data. The 525-run corpus directly evidences the confusion shape
(`.VerticalAlignment` on Reactor `*Element` types, `Theme.AppBackground`,
`.Style(...)`). Tier-2 fuzzy match cannot bridge those by edit distance;
only deterministic vocabulary-translation rules can.

Spec changes (038-mur-check-did-you-mean-design.md):
- §1: new "Why this is load-bearing" subsection with the two-condition
  argument and explicit sunset criterion (≥12mo API stability +
  ≥90% first-build-OK on ≥2 vendor-distinct models).
- §6: rename "induced pattern rules" → "induced and authored pattern
  rules"; split into Class A (induced, frequency-justified) and Class B
  (vocabulary-translation, structurally justified, frequency bar waived).
  Add the resolved symbol-binding decision: rules bind to Roslyn ISymbol
  references via RuleSymbolResolver, not name strings, with a CI gate
  that fails the build on unresolved rule targets.
- §11: two new risks — Reactor API churn invalidating rules/corpus, and
  data-pipeline SLA/owner — both with mitigations.
- §13 Phase 5: reframe from "only if needed" to "scheduled, deferred"
  pending Data Checkpoint D. Add explicit sunset criterion subsection.
- §14: resolve question #8 (symbol-binding decision recorded with
  rationale); add question #9 on vocab-table provenance; renumber
  project-size gate to #10.

Task list (tasks/038-mur-check-did-you-mean-implementation.md):
- Top: new "Framing (read this first)" section with the load-bearing
  argument and sunset criterion link.
- Phase 3: split rule template into Class A / Class B variants. Add §3.0
  pre-phase prerequisites (corpus-pipeline owner; minor-release refresh
  cadence; in-repo `038-vocab-table.csv`). Add §3.1a symbol-binding
  contract with CI gate. Update quantity gates + exit criterion for the
  two-class split.
- Phase 4: status change from "optional" to "scheduled, deferred until
  Data Checkpoint D"; escape hatch remains as the unexpected outcome.
- New "Maintenance (load-bearing operation)" section under cross-cutting
  concerns: API-churn protocol per Reactor minor; corpus freshness rule;
  per-rule accept-rate monitoring; annual sunset-readiness check.

Reference doc (docs/reference/mur-check-did-you-mean.md):
- §1: new "Why this is load-bearing" subsection mirrored from the spec.
- §9 Future improvements: new "The recurring failure mode: WinUI/WPF
  vocabulary confusion" subsection that names the structural failure
  shape, then reframes Phase 3 as Class A / Class B and Phase 4 as
  scheduled-not-optional. Symbol-binding decision called out.
- Out-of-scope (small LLM generator): reasoning now explicitly linked to
  the load-bearing argument (weak training data is why we need the
  system AND why a smaller model trained on it won't fix the gap).
- Glossary: new entries for Class A / Class B rule, Load-bearing,
  Sunset criterion. Validation Gate entry updated for the Class-B
  frequency-bar waiver.
- Closing: pointer to the new task-doc Maintenance section.

No code changes in this commit; all infrastructure decisions documented
here will land in Phase-3 rule PRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(spec-038): address CR feedback round 2 on PR #243

Quality and self-consistency pass on the Phase-1 branch. All changes are
contained to Phase-1 surface; broader CR concerns about CS1061/CS0117 fuzzy
behavior, MSBuild-accurate loading, and per-code precision gating remain
scoped to Phase 2/3 per the spec's existing plan.

- CR #10: drop CS8602 warning in CompilationLoader by routing EmptyCompilation
  through a named factory method with explicit Array.Empty<> coalescing.
- CR #11: diagnostic regex now uses a reluctant file capture anchored on the
  (line,col): suffix so MSBuild lines with parenthesized path segments parse
  correctly. Added pipeline test.
- CR #8: TraceWriter.SanitizePath normalizes in-root absolute paths to
  project-relative (forward-slash) form so traces no longer carry
  `C:\Users\<name>\...` prefixes. Tests strengthened to assert no row is
  ever an absolute path.
- CR #13: replace misleading CS7036 tiebreak comment with accurate
  description; full Hamming-vector ranker stays a deferred follow-up per
  spec §1.5.
- CR #14: 525-run report reworded — "500-pair volume bar met, cross-agent
  bar NOT met"; Theme.get_Background note marked "fixed in this branch"
  with code reference.
- CR #2 (narrowed): tighten CS1061 factory-argument receiver check to
  require receiver IS-A factory return type only (dropped reverse
  IsAssignableFrom direction). Full AST-anchored receiver verification
  deferred to Phase-3 RuleSymbolResolver per §3.1a.
- Implementation doc deferred-follow-ups list updated to include
  receiver-anchoring (e) and Phase-2 loader/precision-gate work (f).

Verification: 98 CheckCommand unit tests pass (was 97 + new parens-path
test); MurCheck integration test passes; CS8602 warning eliminated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 22, 2026
Resolves the 22 findings from the docking feature-branch review +
two test failures that surfaced while running the full suite.

Behavior fixes (Native docking host):
- Tear-out / FloatOp: open the floating window BEFORE removing the
  pane from the docked tree. Layout mutation + OnContentFloated fire
  only when a real ReactorWindow was produced (review #1 — the
  previous broad catch around Open turned a failed transition into a
  success-shaped event).
- Drop-overlay global Esc handler now detaches on reconciler unmount
  in addition to WinUI Unloaded (review #2).
- Floating-window observer callbacks, BeforeInsertToolWindow strategy
  hook, drag-session SessionChanged broadcast, navigator commit
  callback, and theme/resource lookup catches all surface failures via
  Debug.WriteLine or narrow to the expected exception type instead of
  swallowing everything (reviews #3, #4, #5, #7, #8).
- Splitter OnPointerCaptureLost now calls RestorePairToGrow() before
  the final ResizeDelta to converge with the normal release path
  (review #6).

Persistence:
- DockLayoutSerializer.Load now routes pre-current-schema documents
  through DockLayoutMigrationRegistry: parse to JsonNode, detect
  schema (absent $schema = v1 per §5.4.4), TryUpgrade, then
  deserialize. Adds a Load(json, registry) overload and emits a
  PII-safe schema-newer ETW category for forward-tolerant inputs
  (reviews #9 + #10).
- PreviousContainerTracker.ClearAll now actually clears by swapping
  in a fresh ConditionalWeakTable under a lock (review #11).

Surface honesty:
- DockHostModel.Floating is populated by the host renderer from a
  per-manager floating-window tracker; doc comment makes the
  initial-bounds-only limitation explicit (review #12).
- UseDockPanePersisted uses a canonical persisted-key encoder
  (pane:<typeName>|<keyText>:<userKey> with %/colon/pipe escaping)
  so two panes whose Key.ToString() collide get independent slots
  (review #13).
- docking.dock detects ambiguous Key.ToString() matches and returns
  an explicit ambiguous-pane error (review #18).

Test isolation:
- New DockingGlobalsCollection ([Collection("DockingGlobals")] +
  DisableParallelization=true) covers DockingStringsTests,
  DockA11yTests, and DevtoolsDockingToolsTests — three classes that
  mutate process-global state (review #14). DockA11yTests now
  restores DockingStrings.Resolver in Dispose.
- The known-failing UseEffect cleanup assertion is emitted as TAP
  "# SKIP" via a new Harness.Skip helper, with a back-flip to a real
  Check the moment the §2.25 product gap closes (review #15).
- EffectCounterComponent moved off static counters; the fixture owns
  per-run counters and passes mount/cleanup callbacks via props
  (review #16).
- EventListener category assertions in LayoutSerializerTests use a
  bounded retry helper to tolerate occasional async dispatch
  (review #17).

Documentation:
- docs/_pipeline/apps/docking/{api,overview}.md updated for the P2
  reality (core Microsoft.UI.Reactor ship vehicle,
  DockingNativeInterop.Register, deleted vendored WinUI.Dock link)
  (reviews #19, #22).
- DockingStrings.cs + dock-showcase sample comments updated to
  reflect that no .resw resource ships today; DefaultEnglish + the
  resolver are the localization surface (review #20).
- Reactor.csproj stale "stays on disk for reference" comment about
  src/Reactor.Docking.Xaml/ replaced with current state (review #21).

Tests / fluents:
- Added 22 fluent extensions in ElementExtensions.Events.cs for
  DockManager event callbacks + TabViewElement.OnTabDragStarting /
  OnTabDragCompleted so PublicApiSurfaceGuardTests passes; the
  guard test itself is now scoped to public element records only
  (internal overlay/splitter elements aren't part of the public
  surface contract).
- Two stale Phase-1-wrapper fixture names removed from
  SelfTestFixtureRegistry.AllFixtures (they had no factory case and
  surfaced as MSTest "fixture not found" failures).
- NativeDocking_PerGroupDropTargetVisualDemo: observer-pause delays
  cut from 500ms/step to 50ms/step so the 20-step walk stays well
  inside the 15s fixture timeout under CI load; eliminates the
  cascading NRE in DragSessionConfirmMutatesLayout that was caused
  by the timed-out fixture leaving stale host state.
- Mutations_OffOwnerThread_Throw uses an explicit new Thread()
  instead of Task.Run, so the assert can never observe a thread-id
  match by chance.
- Load_MissingSchemaField_FallsBack renamed to
  Load_MissingSchemaField_TreatedAsV1AndMigrated and rewritten —
  empty {} now migrates as v1 (matches the integrated registry).

Validation:
- dotnet test tests/Reactor.Tests -p:Platform=x64
    → 8720 passed, 46 skipped, 0 failed
- dotnet test tests/Reactor.SelfTests -p:Platform=x64
    → 813 passed, 0 failed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 22, 2026
Resolves the 22 findings from the docking feature-branch review +
two test failures that surfaced while running the full suite.

Behavior fixes (Native docking host):
- Tear-out / FloatOp: open the floating window BEFORE removing the
  pane from the docked tree. Layout mutation + OnContentFloated fire
  only when a real ReactorWindow was produced (review #1 — the
  previous broad catch around Open turned a failed transition into a
  success-shaped event).
- Drop-overlay global Esc handler now detaches on reconciler unmount
  in addition to WinUI Unloaded (review #2).
- Floating-window observer callbacks, BeforeInsertToolWindow strategy
  hook, drag-session SessionChanged broadcast, navigator commit
  callback, and theme/resource lookup catches all surface failures via
  Debug.WriteLine or narrow to the expected exception type instead of
  swallowing everything (reviews #3, #4, #5, #7, #8).
- Splitter OnPointerCaptureLost now calls RestorePairToGrow() before
  the final ResizeDelta to converge with the normal release path
  (review #6).

Persistence:
- DockLayoutSerializer.Load now routes pre-current-schema documents
  through DockLayoutMigrationRegistry: parse to JsonNode, detect
  schema (absent $schema = v1 per §5.4.4), TryUpgrade, then
  deserialize. Adds a Load(json, registry) overload and emits a
  PII-safe schema-newer ETW category for forward-tolerant inputs
  (reviews #9 + #10).
- PreviousContainerTracker.ClearAll now actually clears by swapping
  in a fresh ConditionalWeakTable under a lock (review #11).

Surface honesty:
- DockHostModel.Floating is populated by the host renderer from a
  per-manager floating-window tracker; doc comment makes the
  initial-bounds-only limitation explicit (review #12).
- UseDockPanePersisted uses a canonical persisted-key encoder
  (pane:<typeName>|<keyText>:<userKey> with %/colon/pipe escaping)
  so two panes whose Key.ToString() collide get independent slots
  (review #13).
- docking.dock detects ambiguous Key.ToString() matches and returns
  an explicit ambiguous-pane error (review #18).

Test isolation:
- New DockingGlobalsCollection ([Collection("DockingGlobals")] +
  DisableParallelization=true) covers DockingStringsTests,
  DockA11yTests, and DevtoolsDockingToolsTests — three classes that
  mutate process-global state (review #14). DockA11yTests now
  restores DockingStrings.Resolver in Dispose.
- The known-failing UseEffect cleanup assertion is emitted as TAP
  "# SKIP" via a new Harness.Skip helper, with a back-flip to a real
  Check the moment the §2.25 product gap closes (review #15).
- EffectCounterComponent moved off static counters; the fixture owns
  per-run counters and passes mount/cleanup callbacks via props
  (review #16).
- EventListener category assertions in LayoutSerializerTests use a
  bounded retry helper to tolerate occasional async dispatch
  (review #17).

Documentation:
- docs/_pipeline/apps/docking/{api,overview}.md updated for the P2
  reality (core Microsoft.UI.Reactor ship vehicle,
  DockingNativeInterop.Register, deleted vendored WinUI.Dock link)
  (reviews #19, #22).
- DockingStrings.cs + dock-showcase sample comments updated to
  reflect that no .resw resource ships today; DefaultEnglish + the
  resolver are the localization surface (review #20).
- Reactor.csproj stale "stays on disk for reference" comment about
  src/Reactor.Docking.Xaml/ replaced with current state (review #21).

Tests / fluents:
- Added 22 fluent extensions in ElementExtensions.Events.cs for
  DockManager event callbacks + TabViewElement.OnTabDragStarting /
  OnTabDragCompleted so PublicApiSurfaceGuardTests passes; the
  guard test itself is now scoped to public element records only
  (internal overlay/splitter elements aren't part of the public
  surface contract).
- Two stale Phase-1-wrapper fixture names removed from
  SelfTestFixtureRegistry.AllFixtures (they had no factory case and
  surfaced as MSTest "fixture not found" failures).
- NativeDocking_PerGroupDropTargetVisualDemo: observer-pause delays
  cut from 500ms/step to 50ms/step so the 20-step walk stays well
  inside the 15s fixture timeout under CI load; eliminates the
  cascading NRE in DragSessionConfirmMutatesLayout that was caused
  by the timed-out fixture leaving stale host state.
- Mutations_OffOwnerThread_Throw uses an explicit new Thread()
  instead of Task.Run, so the assert can never observe a thread-id
  match by chance.
- Load_MissingSchemaField_FallsBack renamed to
  Load_MissingSchemaField_TreatedAsV1AndMigrated and rewritten —
  empty {} now migrates as v1 (matches the integrated registry).

Validation:
- dotnet test tests/Reactor.Tests -p:Platform=x64
    → 8720 passed, 46 skipped, 0 failed
- dotnet test tests/Reactor.SelfTests -p:Platform=x64
    → 813 passed, 0 failed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Chris Anderson (codemonkeychris) added a commit that referenced this pull request May 23, 2026
Resolves the 22 findings from the docking feature-branch review +
two test failures that surfaced while running the full suite.

Behavior fixes (Native docking host):
- Tear-out / FloatOp: open the floating window BEFORE removing the
  pane from the docked tree. Layout mutation + OnContentFloated fire
  only when a real ReactorWindow was produced (review #1 — the
  previous broad catch around Open turned a failed transition into a
  success-shaped event).
- Drop-overlay global Esc handler now detaches on reconciler unmount
  in addition to WinUI Unloaded (review #2).
- Floating-window observer callbacks, BeforeInsertToolWindow strategy
  hook, drag-session SessionChanged broadcast, navigator commit
  callback, and theme/resource lookup catches all surface failures via
  Debug.WriteLine or narrow to the expected exception type instead of
  swallowing everything (reviews #3, #4, #5, #7, #8).
- Splitter OnPointerCaptureLost now calls RestorePairToGrow() before
  the final ResizeDelta to converge with the normal release path
  (review #6).

Persistence:
- DockLayoutSerializer.Load now routes pre-current-schema documents
  through DockLayoutMigrationRegistry: parse to JsonNode, detect
  schema (absent $schema = v1 per §5.4.4), TryUpgrade, then
  deserialize. Adds a Load(json, registry) overload and emits a
  PII-safe schema-newer ETW category for forward-tolerant inputs
  (reviews #9 + #10).
- PreviousContainerTracker.ClearAll now actually clears by swapping
  in a fresh ConditionalWeakTable under a lock (review #11).

Surface honesty:
- DockHostModel.Floating is populated by the host renderer from a
  per-manager floating-window tracker; doc comment makes the
  initial-bounds-only limitation explicit (review #12).
- UseDockPanePersisted uses a canonical persisted-key encoder
  (pane:<typeName>|<keyText>:<userKey> with %/colon/pipe escaping)
  so two panes whose Key.ToString() collide get independent slots
  (review #13).
- docking.dock detects ambiguous Key.ToString() matches and returns
  an explicit ambiguous-pane error (review #18).

Test isolation:
- New DockingGlobalsCollection ([Collection("DockingGlobals")] +
  DisableParallelization=true) covers DockingStringsTests,
  DockA11yTests, and DevtoolsDockingToolsTests — three classes that
  mutate process-global state (review #14). DockA11yTests now
  restores DockingStrings.Resolver in Dispose.
- The known-failing UseEffect cleanup assertion is emitted as TAP
  "# SKIP" via a new Harness.Skip helper, with a back-flip to a real
  Check the moment the §2.25 product gap closes (review #15).
- EffectCounterComponent moved off static counters; the fixture owns
  per-run counters and passes mount/cleanup callbacks via props
  (review #16).
- EventListener category assertions in LayoutSerializerTests use a
  bounded retry helper to tolerate occasional async dispatch
  (review #17).

Documentation:
- docs/_pipeline/apps/docking/{api,overview}.md updated for the P2
  reality (core Microsoft.UI.Reactor ship vehicle,
  DockingNativeInterop.Register, deleted vendored WinUI.Dock link)
  (reviews #19, #22).
- DockingStrings.cs + dock-showcase sample comments updated to
  reflect that no .resw resource ships today; DefaultEnglish + the
  resolver are the localization surface (review #20).
- Reactor.csproj stale "stays on disk for reference" comment about
  src/Reactor.Docking.Xaml/ replaced with current state (review #21).

Tests / fluents:
- Added 22 fluent extensions in ElementExtensions.Events.cs for
  DockManager event callbacks + TabViewElement.OnTabDragStarting /
  OnTabDragCompleted so PublicApiSurfaceGuardTests passes; the
  guard test itself is now scoped to public element records only
  (internal overlay/splitter elements aren't part of the public
  surface contract).
- Two stale Phase-1-wrapper fixture names removed from
  SelfTestFixtureRegistry.AllFixtures (they had no factory case and
  surfaced as MSTest "fixture not found" failures).
- NativeDocking_PerGroupDropTargetVisualDemo: observer-pause delays
  cut from 500ms/step to 50ms/step so the 20-step walk stays well
  inside the 15s fixture timeout under CI load; eliminates the
  cascading NRE in DragSessionConfirmMutatesLayout that was caused
  by the timed-out fixture leaving stale host state.
- Mutations_OffOwnerThread_Throw uses an explicit new Thread()
  instead of Task.Run, so the assert can never observe a thread-id
  match by chance.
- Load_MissingSchemaField_FallsBack renamed to
  Load_MissingSchemaField_TreatedAsV1AndMigrated and rewritten —
  empty {} now migrates as v1 (matches the integrated registry).

Validation:
- dotnet test tests/Reactor.Tests -p:Platform=x64
    → 8720 passed, 46 skipped, 0 failed
- dotnet test tests/Reactor.SelfTests -p:Platform=x64
    → 813 passed, 0 failed

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codemonkeychris
Chris Anderson (codemonkeychris) deleted the docs/021-reorganization-spec branch May 28, 2026 19:11
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Aug 26, 2026
… identifiers

Findings from the repo `pr-review` skill (7 dimensions + a GPT multi-model
cross-check that confirmed H1/H2 and downgraded H3 to medium).

H1 — docs/research/flux-ui-analysis.md:62. TOC entry 13 still pointed at
`#13-problems-from-ducts-critical-review-that-flux-solves` while the heading
reads "Problems from Reactor's Critical Review That Flux Solves". The previous
commit fixed entries 14 and 15 in the very same hunk and left 13 broken.

H2 — src/Reactor.Cli/Loc/TranslateCommand.cs and docs/specs/005-localization-design.md.
The shipped help text said `--missing-only  Only translate missing or AI-draft
keys`, which describes the DEFAULT behavior, not the flag. Per TranslateCommand.cs
lines 119-136: with `--missing-only` every key already present in the target is
skipped, AI drafts included, so only genuinely missing keys are translated; the
default branch skips existing keys only when `!existingEntry.IsAiDraft`, so it is
the default that re-translates drafts. Corrected the help text and the matching
spec comment. Behavior is deliberately unchanged - this is a text fix, same class
as the rest of this PR.

H3/M1 — the survey probe itself was broken. The original cleanup grepped
`\bduct\b`, which cannot match `duct`-prefixed identifiers (`ductCategory`,
`ductCmd`, `ductHost`, `ductCommands`) or the possessive slug `ducts`. That blind
spot is exactly why H1 survived. Re-scanned with a case-insensitive `duct`
substring probe, filtering ordinary English words (production/conduct/introduce/
seductive/...), and cleaned up what it found - identifiers and doc comments only,
no behavior change:
  - src/Reactor/Controls/PropertyGrid/ReflectionTypeMetadataProvider.cs - five
    locals renamed `duct*` -> `reactor*`, matching the adjacent comment that
    already said "Reactor-specific attributes" and the sibling `sc*`
    (System.ComponentModel) prefix.
  - src/Reactor/Core/CommandInterop.cs, src/Reactor/Hosting/ReactorHostControl.cs -
    XML doc-comment examples that surface in IntelliSense.
  - tests/cmd_perf/CmdPerf.Reactor/Program.cs,
    tests/Reactor.AppTests.Host/SelfTest/Fixtures/CoreCoverageFixtures2.cs - locals.
  - src/Reactor.Advanced/Charting/Charts.Tree.cs - pointed at
    `ductd3-native-chart-migration.md`, which does not exist; retargeted to the
    real docs/specs/016-native-chart-migration.md.
  - docs/specs/010-source-mapping-design.md - proposed artifact name
    `{assembly}.ductsourcemap.json` (nothing implements it yet).

M4 — tests/Reactor.Tests/Cli/CliHelpNamingTests.cs (new). The `duct` help-text bug
shipped and survived a rename because nothing asserted on CLI help output. Adds 10
tests over every `mur loc`/`mur docs` help and unknown-command surface. The expected
name is read from the CLI assembly (`AssemblyName` = `mur`, same value as
`ToolCommandName`) rather than hardcoded, so it fails if the help text drifts from
the binary or the binary is renamed without the help text. `[Collection("ConsoleTests")]`
per the repo rule for console-mutating tests.

Mutation-checked rather than assumed: reintroducing `Usage: duct loc extract` in
ExtractCommand.cs turns the suite red in two independent oracles (2 failed, 8
passed) with an actionable message, then green again on revert.

Verified: full tests/Reactor.Tests suite 13541 passed / 0 failed / 64 skipped;
Reactor.AppTests.Host and CmdPerf.Reactor build with 0 errors; `mur loc translate
--help` re-run against the rebuilt binary. Remaining `duct` hits repo-wide are all
intentional: the rename spec, its task list, the archived C++ prototype specs, the
historical DUCT001 analyzer-id note in critical-review.md, the dated fix-list.md
report, and two vendored monaco-editor JS assets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Aug 27, 2026
* Replace stale duct/duct-loc naming with mur in live docs and CLI

The project was renamed Duct -> Reactor and the CLI duct-loc/duct -> mur,
but stale references survived in places that describe the *current* system.

User-visible impact: every `mur loc <sub> --help` and `mur docs --help`
printed a command name that does not exist ("duct loc extract - ...").
Verified by running the built binary.

Fixed:
- src/Reactor.Cli/Loc/*.cs, Docs/DocsCommand.cs - help/usage/error text
  and doc comments now say `mur`, matching ToolCommandName and the
  existing `Usage: mur figma` / `mur docs new-diagram` siblings.
- docs/specs/005-localization-design.md - section 10 documented the CLI as
  `duct-loc extract|translate|status|validate|prune`; now `mur loc <sub>`.
  Also corrects a `--provider azure-openai` example to the real `--model`
  flag, so the renamed command line is actually runnable.
- docs/specs/013-doc-system-design.md - `duct docs compile` -> `mur docs
  compile`; the same doc already said `mur docs compile` elsewhere.
- docs/specs/tasks/localization-implementation.md - same CLI rename.
- docs/research/flux-ui-analysis.md - TOC anchors still pointed at
  #14-where-duct-is-still-better while the headings read "Reactor", so
  both links were broken.
- tests/Reactor.Tests/Localization/*.cs - `duct-*` temp dir prefixes.
- tests/.../MarkdownHtmlFixtures.cs - `duct@example.com` sample address.

Deliberately left alone (the old name is the subject matter, not a stale
reference): docs/specs/018-namespace-rename.md and
docs/specs/tasks/namespace-rename-implementation.md document the rename
itself; docs/specs/archived/cpp-*.md are a snapshot of a removed C++
prototype whose real namespace was `duct`; tools/reviewer/reports/fix-list.md
is a dated generated report.

Verified: `mur loc|docs ... --help` output, 283 Localization unit tests
pass, MdHtml selftest fixtures (1..2) pass, AppTests.Host builds clean.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Rename AzureOpenAiProvider.cs to match the type it declares

Same defect class as the `duct` cleanup in the previous commit: a name that
lies about what it refers to. The file declared `CopilotTranslationProvider`
(`Name => "GitHub Copilot"`, `using GitHub.Copilot`, `new CopilotClient()`)
with no Azure OpenAI anywhere in it, and it was the only file in Loc/ not
named after its type. A filename is the first thing a reader greps.

- git mv src/Reactor.Cli/Loc/AzureOpenAiProvider.cs -> CopilotTranslationProvider.cs
  (pure rename, contents untouched). No code referenced the old filename;
  C# does not couple filename to type name and nothing globs it explicitly.

Stale prose describing the backend as Azure OpenAI, corrected to GitHub Copilot:
- ITranslationProvider.cs - the `Name` doc comment gave "Azure OpenAI" and
  "Anthropic" as examples; the only implementation returns "GitHub Copilot".
- docs/specs/005-localization-design.md Phase 5 - claimed a multi-provider
  abstraction (Azure OpenAI, OpenAI, Anthropic); shipped code has one
  Copilot provider behind ITranslationProvider.
- tools/reviewer/prompts/security.md - hand-written reviewer agent prompt
  told agents Reactor.Cli "communicates with Azure OpenAI" and to "validate
  Azure OpenAI responses", pointing security review at a backend that does
  not exist. This one actively misdirects an automated reviewer.

The abstraction itself is unchanged: ITranslationProvider is not renamed and
no provider plumbing was restructured.

Left alone: docs/specs/052-controlrod.md (Controlrod's own LLM backend,
genuinely Azure OpenAI for v2 - unrelated subsystem);
docs/specs/tasks/localization-implementation.md line 232 (records the
decision "replaces Azure OpenAI / OpenAI / Anthropic" - the old names are
the subject matter); tools/reviewer/manifest.json and reports/fix-list.md
(dated generated artifacts).

Verified: Reactor.Cli builds with 0 errors, 283 Localization tests pass
(unchanged from before the rename), `mur loc translate --help` still correct.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Update reviewer manifest paths for the provider rename

`tools/reviewer/manifest.json` still listed
`Reactor.Cli/Loc/AzureOpenAiProvider.cs` (batches at lines ~330 and ~1067)
after the previous commit renamed that file.

This is not cosmetic. `run-review.ps1` never opens the listed files itself:
it interpolates the list into an LLM prompt ("Primary files to review:",
lines 117/219/324) and then writes the report header from the manifest —
`**Files reviewed**: $($BatchObj.files.Count)` (lines 181/277/381). The
count comes from the manifest, not from what the agent actually read, so a
dead path makes a batch claim full coverage while silently reviewing one
file fewer.

There is no generator for this manifest (tools/reviewer holds only
apply-fixes.ps1, manager-review.ps1, run-review.ps1, manifest.json and
README.md; run-review.ps1:61 merely reads it), so a hand edit of the two
path strings is the only available fix. Edited as literal string
replacements rather than a JSON round-trip, to avoid reformatting the file;
re-parsed afterwards to confirm the JSON is still valid.

tools/reviewer/reports/fix-list.md still names the old path and is left
alone deliberately: it is a dated record of a past review run (an output
snapshot), not an input that any run consumes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Use Path.Join for temp dir construction in localization tests

Addresses 9 github-code-quality (CodeQL) comments on this PR:
'Call to System.IO.Path.Combine may silently drop its earlier arguments'.

Path.Combine resets to the later segment if that segment is rooted, so
CodeQL flags every Combine whose trailing argument it cannot prove is
relative. Path.Join concatenates unconditionally and has no rooted-path
reset semantics, which removes the whole class of warning without adding
a guard clause or sanitizer that would be dead code here (the trailing
segment is a literal prefix plus a Guid 'N' string, which can never be
rooted).

Path.Join is already the established convention in this repo, including
in tests/Reactor.Tests. Scope is exactly the 9 flagged lines, all matching
Path.Combine(Path.GetTempPath(), ...); the other 56 Path.Combine calls in
these files join within the temp dir, were not flagged, and are untouched.

Behavior is identical: Path.GetTempPath() ends in a separator and the
trailing segment is always relative and non-empty, so both produce the
same path. Verified by the unchanged test count - 283 Localization tests
pass before and after.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Address pr-review findings: broken anchor, inverted help text, missed identifiers

Findings from the repo `pr-review` skill (7 dimensions + a GPT multi-model
cross-check that confirmed H1/H2 and downgraded H3 to medium).

H1 — docs/research/flux-ui-analysis.md:62. TOC entry 13 still pointed at
`#13-problems-from-ducts-critical-review-that-flux-solves` while the heading
reads "Problems from Reactor's Critical Review That Flux Solves". The previous
commit fixed entries 14 and 15 in the very same hunk and left 13 broken.

H2 — src/Reactor.Cli/Loc/TranslateCommand.cs and docs/specs/005-localization-design.md.
The shipped help text said `--missing-only  Only translate missing or AI-draft
keys`, which describes the DEFAULT behavior, not the flag. Per TranslateCommand.cs
lines 119-136: with `--missing-only` every key already present in the target is
skipped, AI drafts included, so only genuinely missing keys are translated; the
default branch skips existing keys only when `!existingEntry.IsAiDraft`, so it is
the default that re-translates drafts. Corrected the help text and the matching
spec comment. Behavior is deliberately unchanged - this is a text fix, same class
as the rest of this PR.

H3/M1 — the survey probe itself was broken. The original cleanup grepped
`\bduct\b`, which cannot match `duct`-prefixed identifiers (`ductCategory`,
`ductCmd`, `ductHost`, `ductCommands`) or the possessive slug `ducts`. That blind
spot is exactly why H1 survived. Re-scanned with a case-insensitive `duct`
substring probe, filtering ordinary English words (production/conduct/introduce/
seductive/...), and cleaned up what it found - identifiers and doc comments only,
no behavior change:
  - src/Reactor/Controls/PropertyGrid/ReflectionTypeMetadataProvider.cs - five
    locals renamed `duct*` -> `reactor*`, matching the adjacent comment that
    already said "Reactor-specific attributes" and the sibling `sc*`
    (System.ComponentModel) prefix.
  - src/Reactor/Core/CommandInterop.cs, src/Reactor/Hosting/ReactorHostControl.cs -
    XML doc-comment examples that surface in IntelliSense.
  - tests/cmd_perf/CmdPerf.Reactor/Program.cs,
    tests/Reactor.AppTests.Host/SelfTest/Fixtures/CoreCoverageFixtures2.cs - locals.
  - src/Reactor.Advanced/Charting/Charts.Tree.cs - pointed at
    `ductd3-native-chart-migration.md`, which does not exist; retargeted to the
    real docs/specs/016-native-chart-migration.md.
  - docs/specs/010-source-mapping-design.md - proposed artifact name
    `{assembly}.ductsourcemap.json` (nothing implements it yet).

M4 — tests/Reactor.Tests/Cli/CliHelpNamingTests.cs (new). The `duct` help-text bug
shipped and survived a rename because nothing asserted on CLI help output. Adds 10
tests over every `mur loc`/`mur docs` help and unknown-command surface. The expected
name is read from the CLI assembly (`AssemblyName` = `mur`, same value as
`ToolCommandName`) rather than hardcoded, so it fails if the help text drifts from
the binary or the binary is renamed without the help text. `[Collection("ConsoleTests")]`
per the repo rule for console-mutating tests.

Mutation-checked rather than assumed: reintroducing `Usage: duct loc extract` in
ExtractCommand.cs turns the suite red in two independent oracles (2 failed, 8
passed) with an actionable message, then green again on revert.

Verified: full tests/Reactor.Tests suite 13541 passed / 0 failed / 64 skipped;
Reactor.AppTests.Host and CmdPerf.Reactor build with 0 errors; `mur loc translate
--help` re-run against the rebuilt binary. Remaining `duct` hits repo-wide are all
intentional: the rename spec, its task list, the archived C++ prototype specs, the
historical DUCT001 analyzer-id note in critical-review.md, the dated fix-list.md
report, and two vendored monaco-editor JS assets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Dispose the StringWriters in the CLI help test capture helper

Addresses two github-code-quality (CodeQL) comments on the test helper added
in the previous commit: "Disposable 'StringWriter' is created but not disposed."

Switched both writers to `using var`. Disposal happens at method exit, which is
after the existing try/finally has already restored Console.Out/Console.Error,
so the console never holds a disposed writer. The returned strings are produced
by ToString() before disposal and are independent of writer lifetime, so the
assertions are unaffected.

10 CliHelpNamingTests still pass.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant