← Back to Pull requests

fix(runtime): enforce private IO and preserve Windows long paths #7603

Closed
unknown closed this pull request without merging on Nov 04, 2026 06:12 UTC
View on GitHub
unknown unknown commented on Oct 28, 2026 18:30 UTC
Author

Current Delivery And Validation

Tested head: 3ee49b41ac358a1e2447da9361083437b0b9764b. This section supersedes the historical validation/readbacks retained below. No merge is requested or authorized.

The private-IO implementation remains intact: both the temporary Todo facts directory and facts.json are protected before dispatch, the consumer still verifies both owner/admin DACLs, the helper remains in the runtime fingerprint, and request/snapshot byte limits and original session identity are unchanged. The real project_todo_read regression still crosses the 64 MiB boundary and rejects a broadened file or parent ACL.

The latest CI repairs were prepared separately in #8013 and applied as four DCO commits: strict kernel typing, bounded asynchronous cancellation readback, browser/settlement fixture repairs, and a correction to the workflow test's simulated clock. The type gate retains all 17 entrypoints and transitive import traversal. There are no mypy configuration changes or blanket ignores. The 1-second loaded-view switch budget is unchanged; no production UI optimization is included.

Local validation at the integrated head:

| Check | Result |
| --- | --- |
| Native Windows snapshot privacy, real oversized Todo facts, Effect RPC integration/request scope, CI workflow contracts and original-deliverable settlement regression | 272 passed, 1 Linux-only thread-group skip |
| Original kernel mypy target set with full import traversal, using Linux CI platform semantics | passed, 17 entrypoints |
| Existing strict Todo CLI adapter mypy gate | passed, 2 entrypoints |
| Original CI Ruff scope and committed diff check | passed |
| Outgoing public-boundary scan of repair paths | passed; no blockers or unread files |
| Chat package build and source verification | passed; browser readback recorded after the fresh build |
| Freshly packaged research disclosure and 200-node M2 browser scenarios | both passed at parent 168a8950; all 5 switches below 1000 ms, maximum 191.73 ms. The only subsequent change is the CI test clock; package source verification also passes at the current head. |
| Workflow gate fixtures and qualification summary renderer | 8 Python GateTests and 7 Node tests passed at the current head; the 135 resource-policy tests are included in the integrated regression above |

The first follow-up CI run exposed a missed test-harness dependency: its immediate fake timer did not advance the wall clock, so the new deadline loop exhausted Node's heap. The fourth commit supplies a matching simulated Date.now() and bounds the harness subprocess. The subsequent Linux changes gate in #8013 passes. The failed earlier run remains historical evidence. A full local Windows invocation also retains Linux-only filename/Bash fixture failures; no such tests were changed to skips.

The independent repair also exercised a broader focused suite: 735 passed and one stale settlement-text assertion failed. That exact assertion failed on unchanged a435d30098c3516bd68781845794a7730dc90972 as well. Its expectation was updated to the current instruction requiring an unfinished Todo to stay open with its original declaration; the product instruction and original-Turn command assertions were retained, and the corrected case passed again at the integrated head.

Environment limits remain explicit: installation fixtures requiring symlinks raise WinError 1314 for the current Windows account; they were not converted to skips. Native Windows mypy also retains pre-existing POSIX-symbol diagnostics. Neither the Linux-platform static result nor the Windows targeted runtime suite certifies the unrun full Linux suite.

Hosted qualification for this head is pending. The prior run remains failed evidence: kernel-contracts reported 789 transitive typing errors, release build timed out on a replaced research disclosure, dashboard-browser recorded a 1056 ms switch against the frozen 1000 ms limit, and maintenance stopped before cancellation finished. Three independent local packaged M2 runs in #8013 passed all 15 switches (maximum 202.21 ms); they do not relabel that hosted failure or establish hosted performance qualification.

The maintenance workflow is deliberately trusted base-branch code. Its new bounded readback does not become active for PR events until #8013 reaches the base branch; this update does not bypass that security boundary or grant merge authority. Exact-head review and required hosted checks are still required.

<details>
<summary>Historical validation and readbacks from earlier heads</summary>

Goal And Delivered Outcome

Private local snapshot/session/validation writes need native Windows access controls, and ordinary long paths must retain complete atomic publication and migration guards. This proposal reuses a platform IO helper to enforce protected owner/admin DACLs before dispatch/publication, verifies returned private snapshots, and uses extended Win32 paths without rewriting stored path text.

This remains an independently reviewable prerequisite split from #5677. #5677 should integrate this boundary after it lands; freshness/recovery policy is not moved into this PR.

Author Declaration

  • Written by: model_agent, OpenAI Codex.

  • Implemented against: #5677 prerequisite/scope review, existing private snapshot and atomic document IO contracts.
  • | Criterion | Disposition | Owner / evidence |
    | --- | --- | --- |
    | Restrict private producer and consumer IO; reject broad ACLs and digest mismatch | implemented | runtime/private_permissions.py, Effect snapshot adapters, native Windows DACL tests |
    | Preserve complete bytes, interrupted replacement and bounded access-denial failure | implemented | Existing document_io.py / file_lock.py owners and native long-path/atomic-write tests |
    | Preserve migration route text and redirection fences | implemented | Existing migration owner; path-text and native junction coverage retained |
    | Exercise the Effect snapshot contract under the same native Windows ACL rule as production | implemented | effect_runtime_snapshot.test.ts now selects the checkout Python and protects both the fixture directory and file before reads/writes |

    Scope And Continuation

    Complete implementation for this IO prerequisite. #5677 keeps necessary protection until this proposal is landed and integrated. No public scan allowance policy, result/direction decisions or new capability is included. The helper owns platform permissions only; existing callers keep namespace, locks and authority decisions.

    The proposal is ready for renewed review and hosted CI qualification. It is not authorized for merge by this update.

    Validation

  • Tested revision: afe5a05f21401490401481455fdee25444d8bccb.

  • Run state: finished locally; new hosted CI is pending after the head update.

  • Input classes: synthetic.
  • | Check kind | Result | Evidence / limitation |
    | --- | --- | --- |
    | Windows curated runtime suite | passed | Qualified Node 22.22.3: 285 total, 257 passed, 28 expected skips, 0 failed. This includes both Effect snapshot tests. |
    | Native Python IO suite | passed | DACL/snapshot, document IO, Todo validation, file-lock atomicity, migration path text and atomic writes: 75 passed, 1 platform skip. |
    | Python runtime bridge | passed | 3 passed, 2 expected skips. |
    | Browser regression scenario | passed | Packaged execution-service-offline scenario completed successfully. |
    | Static/build | passed | Ruff on changed Python; mypy with CI Linux platform on 17 configured sources; TypeScript control-plane typecheck; chat bundle build; git diff --check; DCO; semantic advisory found 0 supported new vocabulary carriers. |
    | CLI base/head comparison | passed | 96 base cases, 96 candidate cases, 0 candidate-only failures, 0 review-required deltas. |
    | Standard premerge aggregate | partial / held | Direct checks, compile checks, 8/8 risk-profile smokes and 7/9 catalog smokes passed. The full CLI budget smoke reproduces the same Windows long-path fixture failure on latest main; the following Todo user-gate smoke passes independently and is only failing in that aggregate sequence. These are preserved as non-green evidence rather than relabelled as passes. |

    Prior Hosted CI Failure Attribution

    The three failed jobs on the previous head did not reach or fail the reviewed Windows snapshot fixture:

  • windows-powershell and kernel-contracts stopped on the same CLI output ceiling (25975 / 25828 versus 25500). Latest main contains the calibrated ceiling from #7614; the branch now includes it.

  • chat-bundle-browser (1) timed out in the original-conversation-unavailable scenario. Latest main contains the separate packaged execution-service-offline repair from #7608, and that scenario passes locally and in the hosted full packaged smoke. The narrower delegation-search smoke still times out on the same alert and remains an explicit hold below.
  • Fresh CI on this exact head is the authoritative hosted result.

    Current Hosted CI Readback

    The exact head proves the proposal's affected boundaries: windows-powershell, all three typescript-core shards, kernel-contracts, kernel-static-checks, PostgreSQL real-server integration, Node minimum compatibility, DCO, dependency review and the stage2c correctness/integration jobs pass. In particular, the native Windows job completed the host-hardened control-plane suite that includes the corrected standalone Effect snapshot tests.

    The overall PR checks are still non-green for failures outside this proposal's changed product surface:

  • Optional Ark and MemT Python 3.11 both fail the same test_turn_plan_missing_todo_does_not_bypass_contract_errors[False] assertion; the two 3.13 matrix jobs are then cancelled. The exact two-case probe is 1 failed, 1 passed on both this head and immutable origin/main@544aa0fee; #7603 does not change turn_driver/driver.py.

  • chat-bundle-browser (1) still times out waiting for the delegation-search original-steward-unavailable alert.

  • chat-bundle-browser (2) and the release build fail the same synthetic team-evidence text wait. The exact smoke also reproduces locally; this PR has no frontend diff.

  • dashboard-browser (2) records four lens switches below 1 second and one at about 1.16 seconds, tripping the frozen 1-second browser budget; this PR has no frontend diff.

  • The aggregate checks failure is a consequence of those browser jobs, not a separate failure.
  • These failures are preserved as CI holds and are not relabelled as passing evidence for this PR. They should be repaired on their owning main surfaces rather than folded into this private-IO prerequisite.

    At the latest readback, six generic pytest shards are still PENDING without a runner result. They remain unqualified; the PR stays open, blocked and unmerged.

    </details>

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: JasonBuildAI Review duration: 9342m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7603"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%