Repository navigation
refactor(policy): split doctor evaluator modules - #106313
Conversation
|
Land-ready proof for exact head
No config, protocol, storage, SDK, dependency, or user-visible behavior change. No changelog entry: internal refactor. |
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 8:25 AM ET / 12:25 UTC. Summary PR surface: Source +236. Total +236 across 15 files. Reproducibility: not applicable. This PR is a behavior-preserving structural refactor rather than a report of broken runtime behavior. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the extraction only after rebasing onto current Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is a behavior-preserving structural refactor rather than a report of broken runtime behavior. Is this the best way to solve the issue? Yes, conceptually: retaining one registration/export facade while extracting cohesive evaluator owners is the narrowest maintainable solution, provided current-main equivalence and real doctor behavior are confirmed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 35fb5ee81ac6. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +236. Total +236 across 15 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
8cf482c to
ac45cac
Compare
ac45cac to
72abe2f
Compare
|
Merged via squash.
|
* refactor(policy): split doctor evaluator modules * refactor(policy): split runtime shape owners * refactor(policy): split doctor policy domains
Closes #106295
What Problem This Solves
extensions/policy/src/doctor/register.tshad grown to roughly 5,600 lines and mixed registration, evaluation orchestration, policy-shape parsing, scoped-policy handling, evidence checks, sandbox checks, and runtime/file helpers. Routine maintenance required navigating one oversized module with many unrelated responsibilities.Why This Change Was Made
Split the implementation into focused owner modules while retaining
register.tsas the stable registration and public-export facade. Runtime shapes, policy shapes, metadata, access findings, ingress findings, agent-workspace findings, evaluation, and scope orchestration now have explicit owners. Every changed production TypeScript file is at most 498 lines, with no compatibility barrel or duplicate implementation path.A declaration-normalization comparison preserves all 213 original declaration bodies with no missing, extra, or mismatched declarations. Registration order, finding order, cache ownership, repair hooks, and public exports remain unchanged.
No config, protocol, storage, SDK, dependency, or user-visible behavior changes.
AI-assisted: yes (Codex). Fresh final-head autoreview reported no accepted/actionable findings at 0.98 confidence.
User Impact
No user-visible behavior change. Policy-doctor maintenance now happens in smaller, focused files with clearer dependency boundaries.
Evidence
72abe2f92a344d3a4d61a2a8799dcee0180bb350on Blacksmith Testboxtbx_01kxe4v31bfjd8vbkec5zkkhyz:corepack pnpm test extensions/policy— 6 files, 344 tests passed.corepack pnpm tsgo:extensions,corepack pnpm tsgo:extensions:test,corepack pnpm lint:extensions,corepack pnpm check:import-cycles, and full-PRcorepack pnpm check:loc --base HEAD~3 --head HEAD— passed; 0 runtime value cycles and 34 production files checked by the LOC ratchet.doctor --lint --only policy/policy-jsonc-missing --jsoncomparison on Testboxtbx_01kxe2r09q81ny0jvxqavm5t9w: base/head output byte-identical, SHA-25661f6feed447705651f542361e2e7fa93e5af66566f0d35547b79651f294efb00; subsequent splits are declaration-equivalent extractions.