Skip to content

test(windows): reproduce owner-directory quota access boundary - #220

Merged
BunsDev merged 5 commits into
mainfrom
test/219-quota-owner-directory-repro
Sep 11, 2026
Merged

test(windows): reproduce owner-directory quota access boundary#220
BunsDev merged 5 commits into
mainfrom
test/219-quota-owner-directory-repro

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 11, 2026

Copy link
Copy Markdown
Member

Protected run 34611963297 failed while enumerating the harness aggregate quota. This adds a native fixture that assigns a real isolated account as directory owner and applies Coven’s owner-only directory DACL, then exercises the actual terminal and background quota paths. Readable-directory and byte-overflow controls distinguish access denial from a quota breach.

The fixture captures its original owner, DACL and inheritance protection through a noninheritable directory handle before restricting access. It restores security through that retained handle, aggregates independent failures, and requires account/root cleanup. The reproduction contract, exact fixture metadata and current roadmap gates are documented.

This advances #219. It does not identify the denied protected-run descendant or repair production accounting. Native fixture acceptance is recorded below; production repair remains #219.

Validation at b40ee09: 128 focused workflow/specification tests passed (19 platform skips), lint passed, eight existing quota diagnostic groups passed, and PowerShell syntax/C# compilation/reflection contracts passed. Independent fixture review found no blockers. All ten CI checks passed: https://github.com/OpenCoven/chat/actions/runs/34618970228. Native Windows logs confirm the terminal/background denial reproduction, readable/overflow controls and complete fixture cleanup; 33 real supervisor tests and 11 native E2E tests passed. This establishes the controlled reproduction, not attribution of the protected descendant or production acceptance.

@BunsDev BunsDev added the ci:full Run the macOS and Windows CI jobs on this pull request label Sep 11, 2026
@BunsDev
BunsDev marked this pull request as ready for review September 11, 2026 16:26
Copilot AI lite review requested due to automatic review settings September 11, 2026 16:26
@BunsDev
BunsDev merged commit e0d5432 into main Sep 11, 2026
10 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The fixture must use production wildcard discovery and Coven’s exact owner-only ACL descriptor.

Pull request overview

Adds a native Windows fixture reproducing owner-directory quota access denial without changing production accounting.

Changes:

  • Adds terminal/background quota checks and overflow controls.
  • Integrates the fixture into Windows tests and metadata validation.
  • Documents reproduction scope, cleanup, and roadmap status.
File summaries
File Summary
src/client-v1-conformance-workflow.test.ts Registers fixture metadata.
scripts/windows-owner-directory-quota.test.ps1 Implements the native ACL and quota fixture.
scripts/windows-job-supervisor.test.ps1 Runs the new fixture.
docs/windows-quota-reproduction.md Documents the reproduction contract.
docs/roadmap.md Records investigation status.
docs/phase1-conformance.md Updates frozen metadata bindings.
Review details

Suppressed comments (3)

scripts/windows-owner-directory-quota.test.ps1:145

  • This quota points directly at the restricted directory, so it skips ExpandQuotaPattern's wildcard discovery stage. The protected harness execution aggregate quota uses Join-Path $isolatedUser.TempPath 'phase1-conformance-run-*' (.github/workflows/client-v1-conformance.yml:9560-9563); keeping the direct path here would let a regression in that production stage go undetected. Use the production wildcard so this terminal/background reproduction covers both stages.
    [OpenCoven.WindowsDirectoryQuota]::new('harness execution aggregate', $directory, 2048)

scripts/windows-owner-directory-quota.test.ps1:183

  • The overflow control repeats the direct path, so even after the denial control is aligned it would still bypass the production wildcard-discovery path. Use the same phase1-conformance-run-* pattern here to keep the readable byte-overflow control on the actual aggregate quota shape.
    [OpenCoven.WindowsDirectoryQuota]::new('harness execution aggregate', $directory, 512)

scripts/windows-owner-directory-quota.test.ps1:117

  • This does not apply Coven’s production owner-only directory descriptor. The native implementation creates directories with O:{sid}D:P(A;OICI;FA;;;{sid}) (src-tauri/src/cleanup_grant.rs:981-987), but the fixture substitutes an OW Owner Rights ACE and GA. Since the ACL boundary is the behavior under test, use the exact owner-SID/FA descriptor or this result does not establish reproduction of the production boundary.
            var descriptor = new RawSecurityDescriptor("O:" + ownerSid + "D:P(A;OICI;GA;;;OW)");
  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@BunsDev
BunsDev deleted the test/219-quota-owner-directory-repro branch September 12, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the macOS and Windows CI jobs on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants