Skip to content

[3015 by GPT-6.1 Sol] Safely bound original managed provider diagnostic logs without losing resumable sessions - #3027

Merged
integry merged 9 commits into
mainfrom
3015/gpt-6.1-sol-safely-bound-original-man-20261012-1705-t9w
Oct 12, 2026
Merged

integry merged 9 commits into
mainfrom
3015/gpt-6.1-sol-safely-bound-original-man-20261012-1705-t9w

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3015

Branch: 3015/gpt-6.1-sol-safely-bound-original-man-20261012-1705-t9w
Commits: ✅ Changes committed (5bbf1b4)


AI Processing Completed

Execution Details:

Summary:
The focused tests pass for active descriptors, preserved auth/config/session canaries, partial-scan recovery, and launch refusal after a multi-GB file grows while waiting for admission. The broader regression run is still in progress. I’ve also added an explicit admin opt-in to discard exact sealed spool segments locally; it records diagnostic loss without claiming an off-site acknowledgement. Original provider files remain protected because no safe native rollover contract has been verified.

Detailed Logs:

  • Conversation: 140 messages
  • Session: null

Log files stored at:

  • conversation: /tmp/claude-logs/issue-3015-2026-10-12T17-23-19-053Z-conversation.json
  • output: /tmp/claude-logs/issue-3015-2026-10-12T17-23-19-053Z-output.txt
Latest Conversation Messages

This PR was created automatically by ProPR after processing issue #3015.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

… diagnostic

Implemented by ProPR AI using gpt-6.1-sol model.

Implementation completed successfully.
@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 1/4

Please investigate and fix this CI failure.

  • Check: Full Test Suite Shard 1/4
  • Result: failure
  • Commit: 5bbf1b4997a6 (5bbf1b4997a66df2c97db486e1a5c0fa27a2d7f4)
  • Details: View CI failure

Failure evidence

.github:35
Process completed with exit code 2.

.github:58
Unterminated template literal.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 3/4

Please investigate and fix this CI failure.

  • Check: Full Test Suite Shard 3/4
  • Result: failure
  • Commit: 5bbf1b4997a6 (5bbf1b4997a66df2c97db486e1a5c0fa27a2d7f4)
  • Details: View CI failure

Failure evidence

.github:35
Process completed with exit code 2.

.github:58
Unterminated template literal.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Connect Discovery and Darwin ACL (Node 22)

Please investigate and fix this CI failure.

  • Check: Connect Discovery and Darwin ACL (Node 22)
  • Result: failure
  • Commit: 5bbf1b4997a6 (5bbf1b4997a66df2c97db486e1a5c0fa27a2d7f4)
  • Details: View CI failure

Failure evidence

.github:26
Process completed with exit code 2.

.github:58
Unterminated template literal.

.github:1
Due to capacity constraints, jobs targeting macOS arm64 runners may experience longer queue times.

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 2/4

Please investigate and fix this CI failure.

  • Check: Full Test Suite Shard 2/4
  • Result: failure
  • Commit: 5bbf1b4997a6 (5bbf1b4997a66df2c97db486e1a5c0fa27a2d7f4)
  • Details: View CI failure

Failure evidence

.github:35
Process completed with exit code 2.

.github:58
Unterminated template literal.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

🛑 Execution Cancelled

The task processing was stopped by user request.

You can post a new comment to restart processing.

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Full Test Suite Shard 4/4

Please investigate and fix this CI failure.

  • Check: Full Test Suite Shard 4/4
  • Result: failure
  • Commit: 5bbf1b4997a6 (5bbf1b4997a66df2c97db486e1a5c0fa27a2d7f4)
  • Details: View CI failure

Failure evidence

.github:35
Process completed with exit code 2.

.github:58
Unterminated template literal.

.github:2
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate Docs Site

Please investigate and fix this CI failure.

Failure evidence

.github:31
Process completed with exit code 2.

.github:58
Unterminated template literal.

.github:6
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/checkout@11d5960. For more information see: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Run Full Test Suite

Please investigate and fix this CI failure.

Failure evidence

.github:70
Process completed with exit code 1.

.github:69
Shard coverage verification finished with result 'failure'.

.github:67
Docs site validation finished with result 'failure'.

@github-actions

Copy link
Copy Markdown

Full Test Suite Results

Validation failed during: Workspace build (docs job), Workspace build (shard 1), Workspace build (shard 2), Workspace build (shard 3), Workspace build (shard 4), Shard coverage verification.

  • Dependency install: success
  • Workspace build: failure
  • Docs validation: skipped
  • Shard coverage verification: failure
  • Hosted native Electron units: skipped (classifier decision: false)
  • Shard 1/4: failed during Workspace build on GitHub Actions 1000083828
  • Shard 2/4: failed during Workspace build on GitHub Actions 1000083831
  • Shard 3/4: failed during Workspace build on GitHub Actions 1000083827
  • Shard 4/4: failed during Workspace build on GitHub Actions 1000083830
View shard 1/4 output
Test output file not available.
View shard 2/4 output
Test output file not available.
View shard 3/4 output
Test output file not available.
View shard 4/4 output
Test output file not available.

View Workflow
View uploaded artifacts

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Windows Connect Discovery (ordinary user, Node 22)

Please investigate and fix this CI failure.

  • Check: Windows Connect Discovery (ordinary user, Node 22)
  • Result: failure
  • Commit: 5bbf1b4997a6 (5bbf1b4997a66df2c97db486e1a5c0fa27a2d7f4)
  • Details: View CI failure

Failure evidence

.github:25
Process completed with exit code 2.

.github:58
Unterminated template literal.

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: CLI and Connect Compatibility Guard

Please investigate and fix this CI failure.

  • Check: CLI and Connect Compatibility Guard
  • Result: failure
  • Commit: 5bbf1b4997a6 (5bbf1b4997a66df2c97db486e1a5c0fa27a2d7f4)
  • Details: View CI failure

Failure evidence

.github:51
Process completed with exit code 1.

.github:50
Darwin Connect authority finished with result 'failure'.

.github:48
Windows Connect discovery finished with result 'failure'.

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit ec385df

Processed 8 comments:

  • Comment 1 by @propr-dev[bot] (ID: 6129195236✓)
  • Comment 2 by @propr-dev[bot] (ID: 6129195913✓)
  • Comment 3 by @propr-dev[bot] (ID: 6129196606✓)
  • Comment 4 by @propr-dev[bot] (ID: 6129197113✓)
  • Comment 5 by @propr-dev[bot] (ID: 6129198349✓)
  • Comment 6 by @propr-dev[bot] (ID: 6129315785✓)
  • Comment 7 by @github-actions[bot] (ID: 6129316111✓)
  • Comment 8 by @propr-dev[bot] (ID: 6129325068✓)

Summary of Changes

Fixed the shared CI build failure by restoring the truncated managedLogSpool.ts and its branch-required methods. Also fixed a worker-incompatible flag in the launch-admission test.

Validation passed: workspace build, docs validation, 36 diagnostics tests, and 107 Connect tests.

Full shards and native macOS/Windows checks still require CI runners. No visual preview was needed.


🤖 Implementation Details

  • Model: GPT-6.1 Sol (medium)
  • Requested By: @propr-dev[bot], @github-actions[bot]
  • Time: 5m 26s
  • Tokens: 1,091,209 (1,086,521 in / 4,688 out)
  • Cost: $0.28

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment IDs: 6129195236✓, 6129195913✓, 6129196606✓, 6129197113✓, 6129198349✓, 6129315785✓, 6129316111✓, 6129325068✓

…d `managedLogSpool.ts` and its branch-required methods. Also fixed a worker-incompatible flag in the launch-admission test.

Fixed the shared CI build failure by restoring the truncated `managedLogSpool.ts` and its branch-required methods. Also fixed a worker-incompatible flag in the launch-admission test.

Validation passed: workspace build, docs validation, 36 diagnostics tests, and 107 Connect tests.

Full shards and native macOS/Windows checks still require CI runners. No visual preview was needed.

PR: #3027
Comment by: @propr-dev[bot] (ID: 6129195236)
Comment by: @propr-dev[bot] (ID: 6129195913)
Comment by: @propr-dev[bot] (ID: 6129196606)
Comment by: @propr-dev[bot] (ID: 6129197113)
Comment by: @propr-dev[bot] (ID: 6129198349)
Comment by: @propr-dev[bot] (ID: 6129315785)
Comment by: @github-actions[bot] (ID: 6129316111)
Comment by: @propr-dev[bot] (ID: 6129325068)
Model: GPT-6.1 Sol
@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @propr-dev[bot]

Analysis Summary

Both CI failures came from the truncated template literal in managedLogSpool.ts, already fixed by branch commit ec385dfc4. No additional changes were needed.

Verified successfully:

  • Workspace build and CLI typecheck
  • 36 diagnostics tests
  • 107 platform-safe Connect tests

Full shards and native Windows/macOS checks still need CI verification. No visual preview was needed.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: GPT-6.1 Sol (medium)
  • Time: 4m 2s
  • Tokens: 433,903 (432,242 in / 1,661 out)
  • Cost: $0.15

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment IDs: 6129194356✓, 6129337966✓

@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

The restarted issue implementation completed after the original ProPR task ID had already reached a terminal state, so its validated changes were not finalized. Reconcile the preserved worktree /tmp/git-processor/worktrees/integry/propr/issue-3015-20261012-1715-gpt-6.1-sol-wxb into this PR at the current head. Compare semantically against the current PR and retain the existing CI follow-up fixes; do not blindly overwrite newer fixes. Port all intended tracked and untracked source/docs/tests for issue #3015, especially nativeLogPolicy.ts, its two tests, launcher integrations, runtime/spool/provider accounting, and policy docs. Do not add generated/temp artifacts such as node_modules or managedLogSpool.ts.tmp; remove the empty .tmp file already present in this PR. Re-run workspace build/typecheck, the native log policy tests, all 31 managed diagnostics tests using isolated tmpfs if the shared disk causes SQLite lock contention, launcher/task lifecycle regressions, docs validation, and git diff --check. Preserve the invariant that original provider files and resumable state are never truncated or deleted and remain explicitly reported as unbounded.

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit b6d2439

Summary of Changes

Reconciled the preserved implementation into the current PR, retaining CI fixes and existing admission/accounting safeguards. Added the native policy, both tests, launcher integrations, status accounting, and docs; removed the empty .tmp file.

Validation passed: workspace builds/typecheck, native policy tests including live OpenCode, all 31 managed diagnostics tests on isolated tmpfs, eight regression files, docs validation, and git diff --check.

Original provider files and resumable state remain protected and explicitly reported as unbounded.


🤖 Implementation Details

  • Model: GPT-6.1 Sol (medium)
  • Requested By: @integry
  • Time: 6m 56s
  • Tokens: 1,577,623 (1,570,710 in / 6,913 out)
  • Cost: $0.39
  • Subscription usage: Weekly +1%

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6129498854✓

…, retaining CI fixes and existing admission/accounting safeguards. Added the native policy, both tests, launcher integrations, status accounting, and docs; removed the empty `.tmp` file.

Reconciled the preserved implementation into the current PR, retaining CI fixes and existing admission/accounting safeguards. Added the native policy, both tests, launcher integrations, status accounting, and docs; removed the empty `.tmp` file.

Validation passed: workspace builds/typecheck, native policy tests including live OpenCode, all 31 managed diagnostics tests on isolated tmpfs, eight regression files, docs validation, and `git diff --check`.

Original provider files and resumable state remain protected and explicitly reported as unbounded.

PR: #3027
Comment by: @integry (ID: 6129498854)
Model: GPT-6.1 Sol
@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/review claude-opus

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — claude-opus

Overall Evaluation

This PR addresses issue #3015 by keeping original provider files strictly protected and refusing new launches when native state looks too large. It classifies native files and adds two launch gates:

  • Mount gate: a physical Docker gate in nativeLogAdmission.ts, reached from prepareAdmittedAgent.
  • Declared-root gate: a check over admin-declared roots in managedLogRuntime.assertNativeLogAdmission and nativeLogPolicy.ts, called from the task executor, Codex app-server, Claude native-goal and Antigravity native-goal launchers.

It also adds per-class inventory accounting in the spool, a high-water mark for partial scans, and a local-only disposal opt-in. The docs are candid that native growth is not bounded.

The protective intent is right, but the gates fail closed in ways an operator cannot fix without deleting the state the issue says must be preserved. Two normal, everyday conditions turn activation into lasting launch outages:

  • a provider home that outgrows the bounded scan, or that contains a directory outside the allowlist;
  • an instance that accumulates its normal number of tracked native transcript files.

The PR needs changes before merge.

✅ No native mutation — Every new path (inspectNativeLogRoot, collectProvider with measureOnly, assertFilesystemCapacity) is metadata-only. It uses descriptor-pinned fstat/statfs and never opens credentials during measurement-only scans. Tests assert that auth, config and session canaries and active writer descriptors survive.

✅ Recheck after entitlement wait — prepareAdmittedAgent re-runs the gate on createArgs after acquiring a slot and before runtime.create. A test grows a file to 3 GiB during acquire and asserts that no container is created or removed.

✅ Partial scans cannot lower capacity — measureNativeState stores Math.max(bytes, source.protected_bytes) for incomplete scans. assertCapacity counts duplicate mounts of one root once via rootIdentity.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Incomplete bounded scans permanently refuse launches

  • Required behavior: Bound original diagnostic logs "without losing resumable sessions". A refusal must be curable by operator storage action, without deleting protected session state. Bounded-scan exhaustion is documented elsewhere as a lower bound, not proof of capacity exhaustion.

  • Evidence: packages/core/src/diagnostics/nativeLogAdmission.ts (assertNativeLogAdmission, if (!collectProvider(...)) throw new Error('incomplete native inventory')), packages/core/src/diagnostics/providerCollector.ts (return !inventoryIncomplete), packages/core/src/diagnostics/nativeLogPolicy.ts (incomplete('unmeasured-directory'), incomplete('scan-limit'), nativeAdmissionReason).

    Static trace (mount gate; default whenever PROPR_MANAGED_LOGS=1 and PROPR_MANAGED_CREDENTIALS_DIR are set):

    1. A managed Claude or Codex home M/agent-a/.claude accumulates session transcripts under projects/… or sessions/…. Over time the allowlisted walk exceeds the entry bound (4,096) or the 250 ms deadline. A slow or contended disk can also exceed the deadline.
    2. collectProvider(..., measureOnly: true) sets inventoryIncomplete and returns false. The new test confirms this: with db.limits.scanFiles = 1, collectProvider(...) returns false.
    3. nativeLogAdmission.ts converts this into native capacity unavailable; operator action required. It does so before the initial admission and again before create, for every task and native-goal launch of that agent.
    4. The only way to get below the bound is to delete transcripts, which is the resumable state the policy forbids pruning. The agent is unlaunchable indefinitely, including resumes of its existing sessions.

    Declared-root gate: inspectNativeLogRoot marks the inventory incomplete for any directory outside nativeDirectoryAllowed. Real provider homes contain such directories; for example, Claude Code creates todos/, shell-snapshots/ and statsig/ in its config dir. nativeAdmissionReason then refuses every launch for every agent whose root is declared, because all roots are checked together.

    Notably, the opt-in live OpenCode test asserts byte counts but never inventoryComplete. All fixtures use minimal homes.

    Existing protections do not help:

    • The high-water mark in measureNativeState already handles partial scans conservatively, but the gate ignores it and refuses outright.
    • Before this PR, the same incompleteness only produced a scan-limit report.

    Assumption: real homes contain non-allowlisted directories. This rests on known provider behavior, not on fixtures in this diff.

  • Minimum fix: For bound or deadline exhaustion and non-allowlisted directories, compare the measured lower bound (and the persisted high-water mark) against the byte thresholds instead of refusing outright. Keep hard refusal only for unsafe entries (symlink/hardlink/foreign/replaced) and unavailable storage. Add a regression test with a home that exceeds the entry bound and contains an unknown directory but is under the byte limits.

F2: 🔴 Source cap turns normal file accumulation into instance-wide outage

  • Required behavior: Launch refusal must have a non-destructive remedy and must not block resumable work merely because the bounded copy spool's cursor table filled with persistent native files.

  • Evidence: packages/core/src/diagnostics/nativeLogAdmission.ts (final spool.assertCapacity()), packages/core/src/diagnostics/managedLogSpool.ts (assertCapacity: if (count >= this.limits.sources) throw …source capacity).

    Static trace:

    1. Worker capture calls collectProvider without measureOnly. collectFile calls spool.trackNativeSource for every allowlisted native file, so each Codex rollout and Claude project JSONL becomes a non-retired source row.
    2. Only transient (Vibe runtime) roots are ever retired. Persistent-home file rows remain.
    3. After roughly 2,048 tracked sources, a normal count over weeks of runs, count >= limits.sources becomes true. The existing sourceCapacityWarning uses the same >= comparison, so this state is reachable.
    4. Every prepareAdmittedAgent call then throws, for every agent on the instance, because nativeLogAdmission.ts calls assertCapacity unconditionally whenever PROPR_MANAGED_LOGS=1 and args[0]==='run'.
    5. The only way to free rows is to delete native files or the spool.

    Before this PR, the same saturation was a status warning. The docs change ("prevents new physical agent launches") acknowledges the new behavior but offers no remedy that preserves sessions. No test exercises a saturated source table through the launch path.

  • Minimum fix: Drop the source-count condition from launch admission and keep it as the existing status warning (the byte thresholds remain). Alternatively, exclude persistent native-file cursor rows from the count used for admission.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Consolidate the two local-only disposal APIs

discardLocal (PROPR_DIAGNOSTIC_LOCAL_ONLY=1, discard-local, requires ack=0, prunes) and disposeLocal (PROPR_DIAGNOSTIC_DISPOSAL=local-only, dispose-local, receipt idempotency, no ack=0 check, no prune) look like an unreconciled merge of two worktrees. They have different flags, gap reasons and semantics. Two near-identical admin interfaces make Fleet and operator documentation error-prone, so one should be picked or the other aliased to it.

S2: 🟢 Reconcile threshold and terminology in docs

managed-diagnostics.md says filesystems need 64 MiB free, while native-provider-log-policy.md says 256 MiB. These are two different gates, but the docs don't say so. managed-diagnostics.md also says measurements "are not allocated-block totals", while nativeMaintenance reports allocatedBytes. The bounds table still labels the 256 MiB/1 GiB row an "admission warning". The two gates should be explicitly distinguished.

S3: 🟢 Invalid root config disables daemon sweep and status

nativeDiagnosticStatus() calls configuredNativeLogRoots(), which throws on malformed or overlapping PROPR_NATIVE_LOG_ROOTS. In scheduleManagedDiagnostics, that aborts the entire sweep (mount measurements included) into diagnosticsFailure(). In the CLI, status fails entirely. Catching the config error and reporting it inside nativeAdmission would keep the other telemetry alive.

S4: 🟢 Mount parsing covers only -v root:target

nativeLogAdmission.ts ignores --mount type=bind,… and -v=… forms. Current builders use -v, so this is hardening only, but a future builder change would silently bypass the gate.

S5: 🟢 Full-module mock of agentRunAdmission in test

test/nativeGoalLaunchBoundary.test.ts replaces the module with only prepareAdmittedAgent. Any transitively imported module that needs spawnAdmittedAgent or resolveAgentRunAdmission would fail to link. Spreading the real exports, as is done for managedLogRuntime, is safer.

S6: 🟢 Redundant scans per launch

dockerExecutor runs the declared-root inspection and then prepareAdmittedAgent runs the mount inventory twice, up to 16 mounts at 250 ms each. On contended hosts this adds latency and widens the chance of deadline-driven incompleteness (see F1). Caching an inventory for the first pre-admission check would reduce this.

Score

The protective design and tests are solid, but both new gates fail closed on ordinary conditions with no session-preserving remedy, which can make activated instances unable to launch or resume agents. Checks are also still pending.

Score: 4/10


🤖 Review Details

  • Model: Claude Opus 5.5
  • Time: 2m 44s
  • Tokens: 104,827 (92,448 in / 12,379 out)
  • Cost: $0.71

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 F2 S1 S2 S3 S4 S5 S6

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 43d1ab3

Summary of Changes

Updated nativeLogPolicy.test.ts to pass module URLs as subprocess arguments instead of interpolating them into JavaScript source, addressing the flagged code-construction pattern.

Validation: 7 tests passed; 1 optional live-provider test skipped. git diff --check passed.

No visual preview needed for this test-only change.


🤖 Implementation Details

  • Model: GPT-6.1 Sol (medium)
  • Requested By: @github-advanced-security[bot]
  • Time: 3m 46s
  • Tokens: 136,203 (135,342 in / 861 out)
  • Cost: $0.06

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 4250925800✓

…bprocess arguments instead of interpolating them into JavaScript source, addressing the flagged code-construction pattern.

Updated `nativeLogPolicy.test.ts` to pass module URLs as subprocess arguments instead of interpolating them into JavaScript source, addressing the flagged code-construction pattern.

Validation: 7 tests passed; 1 optional live-provider test skipped. `git diff --check` passed.

No visual preview needed for this test-only change.

PR: #3027
Comment by: @github-advanced-security[bot] (ID: 4250925800)
Model: GPT-6.1 Sol
@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/fix F1 F2

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit c11c241

Addressed 1 AI review comment (IDs: 6129740036)

Addressed findings F1, F2

Summary of Changes

Implemented F1 and F2 only.

  • Partial scans now use measured lower bounds and persisted high-water marks; unsafe entries and unavailable storage still refuse launches.
  • Source saturation remains a status warning, while admission accounting stays writable.
  • Added regressions for task, native-goal, declared-root, restart, and awaited admission paths. Updated policy docs.

Validation passed: build/typechecks, 46 diagnostics tests, 44 launcher/lifecycle tests, and focused rechecks. Another 25 integration tests skipped because redis-server is unavailable.


🤖 Implementation Details

  • Model: GPT-6.1 Sol (medium)
  • Requested By: @integry
  • Time: 8m 53s
  • Tokens: 965,634 (957,457 in / 8,177 out)
  • Cost: $0.31

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6129812555✓

Applied F3 and F4 only.

- Added a confirmed private CLI reset for stale capacity marks in both admission paths, preserving native files and unacknowledged exports.
- Corrected operator docs for source saturation and incomplete scans.
- Added focused regressions.

Build/typecheck passed; 64 tests passed. Twenty-five Redis-dependent tests skipped because `redis-server` is unavailable.

PR: #3027
Comment by: @integry (ID: 6130076848)
Model: GPT-6.1 Sol
@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/review claude-opus

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — claude-opus

Overall Evaluation

This PR implements the protected/unbounded fallback from issue #3015. Original provider files are never rotated, truncated or deleted. In their place, the PR adds:

  • classified, metadata-only native inventories (nativeLogPolicy.ts, nativeFileClass);
  • a declared-root admission gate for task and native-goal launches (managedLogRuntime.assertNativeLogAdmission);
  • a physical mount gate at the shared Docker admission boundary (nativeLogAdmission.ts), run before and after the entitlement wait;
  • persisted high-water marks, plus an operator reset-native-capacity path;
  • two explicit local-only disposal interfaces for collected copies.

The docs consistently avoid claiming that writers are capped. Overall the design matches the objective and is carefully fenced.

One concrete regression remains. The new filesystem check treats "zero free inodes" as exhaustion even on filesystems that report no inode accounting at all. On such hosts, every launch is refused whenever managed logs are enabled. Many current-head checks are still pending.

✅ Admission rechecked after the entitlement wait — agentRunAdmission.ts calls assertNativeLogAdmission(createArgs) immediately before runtime.create. The test that grows a file to 3 GiB during acquire proves that no container is created or removed.

✅ Partial scans never lower the high-water mark — measureNativeState uses Math.max(bytes, source.protected_bytes) and recordNativeInventory preserves capacityBytesLowerBound when incomplete. Both are covered across restart in the tests.

✅ No native mutation and unsafe entries fail closed — The inventory uses descriptor-pinned lstat/fstat only. incomplete() cannot downgrade an unsafe-* reason to scan-limit. Canary assertions confirm that auth, config and session files are untouched.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F5: 🔴 Inode check refuses all launches on filesystems without inode accounting

  • Required behavior: The launch gate must refuse only when capacity is actually exhausted. With explicit PROPR_MANAGED_LOGS=1, ordinary launches with ample free space must still be admitted. Docs: "must have at least 64 MiB available … and nonzero free inodes".

  • Evidence: packages/core/src/diagnostics/managedLogSpool.ts assertFilesystemCapacity (if (stat.bavail * stat.bsize < BigInt(this.limits.spoolBytes) || stat.ffree === 0n) throw …), reached via packages/core/src/diagnostics/nativeLogAdmission.ts assertNativeLogAdmission (spool.assertFilesystemCapacity() and spool.assertFilesystemCapacity(pinned)).

    Static trace:

    1. An instance enables PROPR_MANAGED_LOGS=1. Its PROPR_DIAGNOSTIC_ROOT sits on a filesystem with dynamic inode allocation. Btrfs is the common case: its statfs reports f_files = 0 and f_ffree = 0, which is why df -i shows 0 there.
    2. Any docker run reaches prepareAdmittedAgent and calls assertNativeLogAdmission(args). This includes the self-managed path with no Redis config, because the gate now runs before resolveAgentRunAdmission.
    3. assertFilesystemCapacity() reads ffree === 0n and throws managed diagnostics: filesystem capacity; operator action required, even with hundreds of GiB free.
    4. Every agent launch on the instance is refused. The same check runs again against each recognized native mount via assertFilesystemCapacity(pinned).

    Freeing space or running reset-native-capacity cannot clear this, because the condition is a property of the filesystem rather than of usage.

    The existing tests do not catch it: nativeLogAdmission.test.ts mocks statfsSync to {ffree:100n} in every launch scenario. The only zero-inode case asserts refusal, which encodes the bug.

    Assumption: btrfs (and similar dynamic-inode filesystems) report f_files = f_ffree = 0. This is well known but was not executed in this review.

  • Minimum fix:

    1. Refuse on inodes only when the filesystem reports inode accounting, i.e. stat.files > 0n && stat.ffree === 0n.
    2. Add a test with {files: 0n, ffree: 0n, bavail: large} that asserts admission succeeds.

Suggestions

These are optional follow-ups and are not sent to /fix.

S12: 🟢 Symlinks or special files in declared roots block every agent

inspectNativeLogRoot opens every non-directory entry with dir.file() (O_NOFOLLOW, nlink 1, same uid). Any symlink, socket or hardlink, even an unknown top-level file, therefore yields unsafe-entry. nativeAdmissionReason then refuses launches for all configured agents, because every declared root is inspected on each launch.

Providers may create benign symlinks; for example, some Claude versions maintain a debug/latest link. The physical gate's collectProvider merely excludes unmatched entries. Consider counting unmatched non-regular entries as unmeasured rather than unsafe, and scoping refusal to the launching agent's own root. A live check against the pinned provider versions would settle this.

S13: 🟢 Bad declared-root config also kills status and the daemon sweep

scripts/managed-diagnostics.ts status now calls nativeDiagnosticStatus(). src/daemon/managedDiagnostics.ts calls it before the per-agent loop, inside the same try.

A malformed or mismatched PROPR_NATIVE_LOG_ROOTS throws from configuredNativeLogRoots, with these effects:

  • the private status CLI exits non-zero with no output;
  • every daemon sweep aborts before measuring any agent.

Fail-closed admission is right, but status should report the configuration error (e.g. nativeAdmission.status: 'invalid-configuration') rather than disappear.

S14: 🟢 Two overlapping local-disposal interfaces

discardLocal (PROPR_DIAGNOSTIC_LOCAL_ONLY=1, requires ack=0, calls prune) and disposeLocal (PROPR_DIAGNOSTIC_DISPOSAL=local-only, idempotent receipt, no prune) differ subtly in several ways:

  • gating environment variables;
  • idempotency;
  • whether they prune;
  • the gap reason they record.

status().disposalPolicy merges the two flags. Consolidating on one interface would reduce operator confusion and drift.

S15: 🟢 Synchronous scan cost per launch

Each launch can run up to 16 mount scans at 250 ms each, before and after acquire, plus the 2-second declared-root pass. All of this is synchronous, which can block the worker event loop for several seconds, close to the 10-second renewal cadence for leaseMs/3. Consider caching a fresh inventory for a short TTL, or yielding between roots.

S16: 🟢 Unavailable spool surfaces as a TypeError

nativeLogAdmission.ts uses managedDiagnostics()!. When the spool cannot be opened, launches are refused with an opaque Cannot read properties of undefined. This is fail-closed, as documented, but an explicit managed diagnostics: spool unavailable; operator action required error would make the refusal diagnosable.

S17: 🟢 Test still interpolates paths into eval source

nativeLogAdmission.test.ts embeds ${JSON.stringify(root)} into -e code strings, the pattern CodeQL flagged. nativeLogPolicy.test.ts already passes values via process.argv; apply the same approach here to clear the alert.

Score

The design and tests match the objective well. However, the new inode check can refuse every launch on common dynamic-inode filesystems, and many current-head checks are still pending.

Score: 6/10


🤖 Review Details

  • Model: Claude Opus 5.5
  • Time: 2m 46s
  • Tokens: 114,301 (102,637 in / 11,664 out)
  • Cost: $0.75

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F5 S12 S13 S14 S15 S16 S17

🤖 Review by ProPR

@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/fix F5

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 5c132e6

Addressed 1 AI review comment (IDs: 6130324653)

Addressed finding F5

Summary of Changes

Implemented F5 only. Inode exhaustion now blocks launches only when files > 0 and ffree === 0.

Regressions cover unaccounted inodes on spool and native mounts, self-managed launches, and post-acquisition checks. Byte and accounted-inode exhaustion still refuse admission.

Validation: 48 tests passed; one opt-in live test skipped. Core typecheck and diff checks passed. No additional defect found in sibling checks.


🤖 Implementation Details

  • Model: GPT-6.1 Sol (medium)
  • Requested By: @integry
  • Time: 4m 5s
  • Tokens: 399,944 (397,002 in / 2,942 out)
  • Cost: $0.15

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6130334848✓

…nly when `files > 0` and `ffree === 0`.

Implemented F5 only. Inode exhaustion now blocks launches only when `files > 0` and `ffree === 0`.

Regressions cover unaccounted inodes on spool and native mounts, self-managed launches, and post-acquisition checks. Byte and accounted-inode exhaustion still refuse admission.

Validation: 48 tests passed; one opt-in live test skipped. Core typecheck and diff checks passed. No additional defect found in sibling checks.

PR: #3027
Comment by: @integry (ID: 6130334848)
Model: GPT-6.1 Sol
@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/review claude-opus

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — claude-opus

Overall Evaluation

This PR closes the original-file gap left by #3014. It does not rotate native provider files. Instead it:

  • measures declared and mounted provider homes using metadata only;
  • classifies the bytes as diagnostic, session, database, auth-config or unknown;
  • persists high-water marks across restarts;
  • refuses new Docker launches when protected capacity or free space is exhausted.

It also adds an operator reset-native-capacity CLI and local-only disposal commands, and documents the protected/unbounded fallback carefully.

The refusal is reached through two gates:

  • assertNativeLogAdmission in managedLogRuntime.ts covers declared roots, for tasks and native goals;
  • assertNativeLogAdmission in nativeLogAdmission.ts covers mounts, inside prepareAdmittedAgent, both before admission and again before create.

The safety engineering is strong. One design defect in what the capacity gate counts makes the feature unusable for ordinary long-lived agent homes once activated. It needs a change before merge.

✅ Never stops an existing writer — Every refusal is raised before spawnWithNetworkPolicy or runtime.create. Examples are claudeNativeGoal.ts:709, codexAppServer.ts:94, the dockerExecutor startDockerCommand guard, and the second check after entitlement acquisition in agentRunAdmission.ts:315. In the post-acquire case, refusal goes through finish() and releases the slot. The tests in nativeGoalLaunchBoundary.test.ts assert that there is no network admission, no spawn and no input delivery on refusal.

✅ Descriptor-pinned, metadata-only inventory — inspectNativeLogRoot enumerates through /proc/self/fd. It validates each opened object against its lstat dev/ino and uses fstat sizes, so sparse multi-GB files cost nothing. The test suite covers ancestor swap, symlink, hardlink and FIFO cases, with foreign canaries.

✅ Conservative persisted lower bounds — recordNativeInventory and measureNativeState only raise capacity on partial scans and keep the value across restarts. resetNativeCapacity clears only native rows, leaving copy cursors, gaps and unacknowledged segments intact. All of this is tested end-to-end through the CLI.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F6: 🔴 Capacity gate counts resumable session/database bytes, with no non-destructive remediation

  • Required behavior: Issue Safely bound original managed provider diagnostic logs without losing resumable sessions #3015 asks to bound original diagnostic logs "without losing resumable sessions". The changed policy's own invariants say "No resume-dependent deletion is authorized" and "Storage expansion alone does not lower retained logical-byte measurements". A launch refusal therefore needs a remediation path that does not require deleting protected session state.

  • Evidence: packages/core/src/diagnostics/nativeLogPolicy.ts nativeAdmissionReason, packages/core/src/diagnostics/providerCollector.ts measure, packages/core/src/diagnostics/managedLogSpool.ts assertCapacity, packages/core/src/diagnostics/nativeLogAdmission.ts (final spool.assertCapacity()).

    Static trace:

    1. An instance sets PROPR_MANAGED_LOGS=1, the approved activation for all deployments. A managed Codex or Claude agent has accumulated ≥256 MiB of ordinary resume history. Examples are sessions/YYYY/MM/DD/rollout-*.jsonl, projects/<slug>/*.jsonl, or Codex logs_<n>.sqlite/state_<n>.sqlite with WAL.
    2. On the next launch of any agent, prepareAdmittedAgent calls the mount gate. collectProvider(..., measureOnly) runs measure(relative, size), which adds every session and database file to protectedBytes (protectedBytes += size before classification). measureNativeState persists the total into sources.protected_bytes.
    3. assertCapacity throws protected native state capacity because bytes.some(value => value >= this.limits.protectedBytes) is true. The declared-root path does the same: observedBytes includes the session, database, auth-config and unknown classes, and nativeAdmissionReason compares it with rootBytes/totalBytes. In both cases the check covers all agents, not only the oversized one; the reset test asserts that agent B is refused because of agent A's root.
    4. The operator runs reset-native-capacity. The next launch rescans the unchanged session history and re-blocks. The docs and test confirm this: "Reset is no bypass for a root that is still oversized".
    5. Expanding storage does not help, by the PR's own docs. The only ways to restore launches are to delete resumable session or database state, or to disable managed diagnostics.

    Observable consequence: enabling managed diagnostics turns normal, non-diagnostic session growth into an instance-wide launch outage. The only exit is the session deletion the issue and docs forbid. In the Codex example, diagnosticBytes may be near zero while sessionBytes/databaseBytes alone trip the 256 MiB per-root limit.

    Existing protections do not prevent this. Classification is computed (nativeFileClass, NativeInventory.*Bytes), but neither gate uses the class when comparing against the thresholds. The tests only exercise the threshold with diagnostic-class sparse files (debug/run.txt, log/codex-tui.log), so the session-dominated case is untested.

    Proposed regression: a Claude home with 300 MiB of projects/-workspace/*.jsonl and an empty debug/. Assert that a different agent's launch is still admitted, and that status reports the session bytes.

  • Minimum fix:

    • Base the per-root and aggregate byte refusal on diagnostic-class bytes (optionally plus unknown) in both nativeAdmissionReason and assertCapacity/measureNativeState. Session, database and auth-config bytes would remain reported in status but not drive refusal.
    • Rely on the existing free-space reserve checks (minimumFreeBytes, assertFilesystemCapacity) to prevent actual disk exhaustion from session growth.
    • Add a session-dominated regression test.

Suggestions

These are optional follow-ups and are not sent to /fix.

S18: 🟢 Declared-root misconfiguration aborts the whole daemon pass

scheduleManagedDiagnostics now calls nativeDiagnosticStatus() before the existing per-agent loop. That call throws from configuredNativeLogRoots on a malformed PROPR_NATIVE_LOG_ROOTS or a PROPR_INSTANCE_ID mismatch. The throw skips the shared-tmp-claude-logs report and all existing per-agent measurements, leaving only a generic diagnosticsFailure() warning. The private status CLI fails the same way, so the operator loses the tool needed to diagnose the problem. Isolating the declared-root inventory in its own try/catch, and surfacing a nativeAdmission.status: 'misconfigured' field, would keep the existing collection running.

S19: 🟢 Two divergent local-only disposal interfaces

discardLocal (PROPR_DIAGNOSTIC_LOCAL_ONLY=1, discard-local) and disposeLocal (PROPR_DIAGNOSTIC_DISPOSAL=local-only, dispose-local) do the same job but behave differently:

discardLocal disposeLocal
ack=0 check yes no
Prunes yes no
Idempotent receipt no yes
Gap reason local-only-discard local-only-disposal

This reads as a reconciliation artifact. Collapsing them into one implementation, keeping the old command as an alias, would reduce operator confusion and the status disposalPolicy ambiguity.

S20: 🟢 Same exported name, different signatures

managedLogRuntime.assertNativeLogAdmission(agent) and nativeLogAdmission.assertNativeLogAdmission(args) share a name but have different contracts; the tests already have to alias one. Renaming them, for example assertDeclaredRootAdmission and assertMountAdmission, would prevent a future call site from importing the wrong gate.

S21: 🟢 Declared-root inspector is stricter than the mount gate for untraversed entries

inspectNativeLogRoot checks the uid of unknown directories before deciding not to traverse them. It also opens every non-directory entry through dir.file, which requires a regular, single-link, owner-matching file. As a result, any unrelated symlink, hardlink or foreign-owned subdirectory in a declared home becomes unsafe-entry and refuses all launches. The mount-based collectProvider path just counts these as excludedEntries. Counting unknown entries as excluded or incomplete, rather than unsafe, would align the two gates. I could not verify that current provider homes contain such entries, so this is hardening.

S22: 🟢 Remaining interpolated paths in test eval code

nativeLogPolicy.test.ts was changed to pass module URLs via argv, apparently in response to the CodeQL "improper code sanitization" alert. nativeLogAdmission.test.ts still interpolates ${JSON.stringify(root)} into four -e scripts. Passing the path via argv or env would likely keep the pending CodeQL analysis clean.

S23: 🟢 Synchronous scan cost and lock contention on the launch path

Each launch can run a declared-root scan of up to 2 s synchronously, plus one or two mount scans, and several IMMEDIATE transactions with a 100 ms busy timeout. Daemon sweeps and concurrent workers share the same SQLite file. SQLITE_BUSY maps to "native capacity unavailable", which is a spurious customer-visible refusal. Two mitigations are worth considering:

  • a short busy-retry, or treating busy as "use the last persisted inventory";
  • caching a very recent inventory per root.

S24: 🟢 Documentation threshold inconsistencies

managed-diagnostics.md says eligible filesystems need 64 MiB free (spoolBytes), while native-provider-log-policy.md says 256 MiB (minimumFreeBytes). The bounds table still labels 256 MiB / 1 GiB an "admission warning", although it is now a refusal. Clarifying which gate applies which threshold would help operators.

Score

The implementation is careful, well-tested, and correct about never stopping existing writers. However, the new launch refusal counts resumable session and database bytes, so normal history growth causes an instance-wide outage whose only remediation is deleting protected state. Checks are still pending.

Score: 5/10


🤖 Review Details

  • Model: Claude Opus 5.5
  • Time: 3m 29s
  • Tokens: 120,777 (105,595 in / 15,182 out)
  • Cost: $0.83

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F6 S18 S19 S20 S21 S22 S23 S24

🤖 Review by ProPR

@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/fix F6

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 9b954b4

Addressed 1 AI review comment (IDs: 6130520510)

Addressed finding F6

Summary of Changes

Implemented F6 only. Both capacity gates now count diagnostic bytes, preserve session/database reporting, and retain filesystem reserve checks. Legacy persisted totals migrate without deleting native state or releasing pending copies.

Added regressions across all five providers, including session growth during admission waits.

Validation passed: workspace builds/typechecks, docs validation, and 100 regression tests. Redis-backed cases were skipped because redis-server is unavailable.


🤖 Implementation Details

  • Model: GPT-6.1 Sol (medium)
  • Requested By: @integry
  • Time: 7m 22s
  • Tokens: 1,454,439 (1,445,914 in / 8,525 out)
  • Cost: $0.38

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6130533478✓

…ic bytes, preserve session/database reporting, and retain filesystem reserve checks. Legacy persisted totals migrate without deleting native state or releasing pending copies.

Implemented F6 only. Both capacity gates now count diagnostic bytes, preserve session/database reporting, and retain filesystem reserve checks. Legacy persisted totals migrate without deleting native state or releasing pending copies.

Added regressions across all five providers, including session growth during admission waits.

Validation passed: workspace builds/typechecks, docs validation, and 100 regression tests. Redis-backed cases were skipped because `redis-server` is unavailable.

PR: #3027
Comment by: @integry (ID: 6130533478)
Model: GPT-6.1 Sol
@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/review claude-opus

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — claude-opus

Overall Evaluation

This PR completes the #3015 follow-up to #3014. Original provider files are still never modified. The PR adds three things:

  • Classified native inventory. Native files are measured by class (diagnostic, session, database, auth-config, unknown) using metadata only.
  • Two launch gates.
    • A declared-root gate in managedLogRuntime.assertNativeLogAdmission, driven by PROPR_NATIVE_LOG_ROOTS.
    • A physical mount gate in nativeLogAdmission.assertNativeLogAdmission, called from prepareAdmittedAgent.
  • Operator remediation through the private CLI. This covers reset-native-capacity and local-only disposal of copy segments.

I traced every launcher integration through the existing paths:

  • the shared Docker executor;
  • the Claude and Antigravity native goals;
  • the Codex app-server, via spawnWithNetworkPolicy → spawnAdmittedAgent → prepareAdmittedAgent.

In each, the refusal happens before Docker create or spawn. After the entitlement wait, the refusal goes through the existing finish() fence/release path.

I could not drive any changed path to a verified incorrect outcome, so there are no blockers. Several design choices are strict enough that they could refuse launches in real deployments. They depend on provider behavior or timing I could not verify, so they are listed as suggestions.

Merge readiness depends on the 16 pending checks, including the workspace build and typecheck that failed earlier in this PR's history.

✅ Refusal precedes physical creation on every launcher — codexAppServer.ts, claudeNativeGoal.ts, antigravityNativeGoal.ts and dockerExecutor.ts run the declared gate before network/spawn. agentRunAdmission.ts re-runs the physical gate on createArgs after acquisition, inside the try, so a refused post-wait launch is fenced and released rather than leaked. nativeGoalLaunchBoundary.test.ts asserts zero network admissions, zero spawns, and no input delivery.

✅ Admission uses diagnostic-class bytes, not resumable state — nativeFileClass separates diagnostic, session, database and auth-config bytes. Both nativeAdmissionReason and ManagedLogSpool.assertCapacity gate on diagnostic bytes only. assertCapacity also deduplicates by root dev:ino identity, so duplicate rows for one root are counted once. The migration test shows legacy all-class totals no longer refuse a session-dominated home.

✅ Native originals are never mutated — Every new path only opens and fstats files through pinned descriptors. Tests check canaries for session, auth and config files, active append descriptors, and a sparse 3 GiB file with a bounded-RSS assertion.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S25: 🟢 Declared inventory opens unknown entries

nativeLogPolicy.ts inspectNativeLogRoot calls dir.file() on every non-directory entry at the root and in allowed subdirectories, including unknown ones. Any symlink, FIFO, socket, hardlinked file, or file with a different owner therefore becomes unsafe-entry. That refuses launches for every declared agent, because nativeAdmissionReason aggregates across all roots.

The physical collector (providerCollector.ts visitEntry) treats the same non-allowlisted entries as excludedEntries and never opens them. The two gates can therefore disagree on the same home.

If a provider creates something like a debug/latest symlink (I believe Claude Code does, but did not verify it), a declared Claude root would be refused permanently with "inventory incomplete". Consider either:

  • counting unknown non-regular entries as excluded/unknown (via lstat only), or
  • refusing only for allowlisted names, to match the collector.

S26: 🟢 Contention turns into launch refusal

Physical admission (nativeLogAdmission.ts) runs measureNativeState and assertCapacity against the shared SQLite spool, which has a 100 ms lock wait. Several actors write to it concurrently:

  • each process's logger flushes every 25 ms;
  • the daemon sweeps;
  • other workers run their own launch gates.

A lock timeout is caught and re-thrown as "native capacity unavailable; operator action required". The task fails with a misleading operator-action message, even though storage is healthy.

The PR thread already mentions SQLite lock contention in tests. A bounded retry, or a longer busy timeout for admission transactions, would separate transient contention from real storage failure.

S27: 🟢 Malformed root config disables daemon sweep

src/daemon/managedDiagnostics.ts now calls nativeDiagnosticStatus() at the top of each pass. If PROPR_NATIVE_LOG_ROOTS is malformed or has the wrong instance, configuredNativeLogRoots throws. The whole pass then ends in diagnosticsFailure(), so no per-agent mount inventory is refreshed.

The CLI status command fails the same way, which hides status exactly when an operator needs it. Consider isolating that call in its own try/catch and reporting the configuration error in status.

S28: 🟢 Partial scans make high-water marks effectively permanent

providerCollector.ts now sets inventoryIncomplete for any unknown directory. Real Claude and Codex homes almost always contain one. Their diagnostic high-water mark then never drops after an operator deletes logs (measureNativeState takes Math.max on partial scans), and every agent's launches stay refused until a manual reset-native-capacity.

This is documented, but it is operationally harsh. Consider letting a partial scan lower the diagnostic bound when every allowlisted diagnostic directory was fully traversed, because unknown directories never contribute diagnostic bytes anyway.

S29: 🟢 Consolidate duplicate local-disposal interfaces

managedLogSpool.ts exposes both discardLocal and disposeLocal, and the CLI exposes both discard-local and dispose-local. They differ in several ways:

discard-local / discardLocal dispose-local / disposeLocal
Environment flag PROPR_DIAGNOSTIC_LOCAL_ONLY=1 PROPR_DIAGNOSTIC_DISPOSAL=local-only
Confirmation token --accept-local-diagnostic-loss --local-only-loss-accepted
Requires ack=0 Yes No
Idempotent receipt No Yes
Calls prune() Yes No

This looks like a reconciliation artifact, and the two docs describe them separately. Consider keeping one implementation and one documented interface, perhaps with the other as an alias.

Also confirm that gap() accepts the new 'local-only-discard' and 'local-only-disposal' reasons under strict typechecking. Its signature was not visible here, and the build checks are still pending.

S30: 🟢 Physical gate mount parsing coverage

nativeLogAdmission.ts recognizes only separate -v and --volume arguments. It does not recognize --volume=…, -v=… or --mount type=bind,…. It also skips the gate entirely for costCapExempt runs in dockerExecutor.ts.

The current builders appear to use -v, but a future builder change would silently bypass measurement. Consider normalizing these forms, or asserting that no unparsed provider-target mount exists.

S31: 🟢 Declared roots not rechecked after the entitlement wait

After acquisition, only the physical gate runs again (agentRunAdmission.ts). The declared-root 256 MiB free-space reserve, and the capacity of declared roots that are not mounted by this launch, are checked only before the wait. managed-diagnostics.md says diagnostics capacity is enforced "again after any entitlement wait".

Either recheck the declared gate at the create boundary, or narrow the documentation claim.

S32: 🟢 Clearer storage-unavailable refusal

nativeLogAdmission.ts does managedDiagnostics()!. If the spool is unavailable, the refusal surfaces as a raw TypeError. An explicit "managed diagnostics storage unavailable; operator action required" error would match the declared gate's message and make refusals easier to diagnose.

Score

The implementation fits the protected/unbounded fallback scope, never touches native or resumable state, and has extensive tests. No verified blockers remain. Merge readiness depends on pending build, typecheck and shard results, given this PR's earlier build failures and the unverified gap() reason typing. Several fail-closed paths (S1, S2) carry real operational risk.

Score: 7/10


🤖 Review Details

  • Model: Claude Opus 5.5
  • Time: 4m 47s
  • Tokens: 130,628 (110,050 in / 20,578 out)
  • Cost: $0.96

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S25 S26 S27 S28 S29 S30 S31 S32

🤖 Review by ProPR

@github-actions

Copy link
Copy Markdown

Checks Failed

Validation failed during setup, tests, CLI packaging, linting, or build checks.

View Logs
Build check diagnostics for run 38294415077, attempt 1
Checkout outcome: success

--- GitHub Actions workflow lint ---
docker.io/rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667: Pulling from rhysd/actionlint
589002ba0eae: Pulling fs layer
c09af8888d6a: Pulling fs layer
4ccd7d76ca98: Pulling fs layer
b6b4b7b0e257: Pulling fs layer
b6b4b7b0e257: Waiting
c09af8888d6a: Verifying Checksum
c09af8888d6a: Download complete
589002ba0eae: Verifying Checksum
589002ba0eae: Download complete
4ccd7d76ca98: Verifying Checksum
4ccd7d76ca98: Download complete
b6b4b7b0e257: Verifying Checksum
b6b4b7b0e257: Download complete
589002ba0eae: Pull complete
c09af8888d6a: Pull complete
4ccd7d76ca98: Pull complete
b6b4b7b0e257: Pull complete
Digest: sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
Status: Downloaded newer image for rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
docker.io/rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667

--- Release shell script lint ---

--- Toolchain ---
v22.23.3
10.9.9

--- Dependency installation ---
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated [email protected]: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]

added 1137 packages, and audited 1146 packages in 21s

323 packages are looking for funding
  run `npm fund` for details

8 high severity vulnerabilities

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

--- CLI release package ---
Verifying propr-cli release package...

> [email protected] cli:pack
> node packages/cli/scripts/build-publish.mjs


> @propr/[email protected] build
> tsc


> @propr/[email protected] build
> tsc


> @propr/[email protected] build
> tsc && node scripts/copy-assets.mjs

copy-assets: copied 9 file(s) into the CLI package.

Staged [email protected] at /home/runner/work/propr/propr/dist-publish/propr-cli
npm notice
npm notice 📦  [email protected]
npm notice Tarball Contents
npm notice 26.7kB README.md
npm notice 36.3kB dist/agentSkill.js
npm notice 754B dist/api/agentRuntime.js
npm notice 7.1kB dist/api/agents.js
npm notice 2.6kB dist/api/agentTank.js
npm notice 4.0kB dist/api/automations.js
npm notice 11.7kB dist/api/client.js
npm notice 5.0kB dist/api/errors.js
npm notice 16.6kB dist/api/goals.js
npm notice 6.0kB dist/api/implement.js
npm notice 2.4kB dist/api/index.js
npm notice 1.9kB dist/api/logs.js
npm notice 6.2kB dist/api/plans.js
npm notice 4.2kB dist/api/relay.js
npm notice 12.3kB dist/api/repos.js
npm notice 14.2kB dist/api/settings.js
npm notice 775B dist/api/stats.js
npm notice 1.6kB dist/api/syntheticPools.js
npm notice 1.8kB dist/api/system.js
npm notice 5.9kB dist/api/tasks.js
npm notice 2.9kB dist/api/todos.js
npm notice 86B dist/api/types.js
npm notice 313B dist/api/visualPreviewAuth.js
npm notice 28.7kB dist/assets/env.example.txt
npm notice 5.8kB dist/auth/githubLogin.js
npm notice 19.4kB dist/commands/agentCommands.js
npm notice 4.2kB dist/commands/agentPoolCommands.js
npm notice 4.3kB dist/commands/agentSkillCommands.js
npm notice 29.7kB dist/commands/agentValidation.js
npm notice 27.2kB dist/commands/automationCommands.js
npm notice 70.8kB dist/commands/checkCommands.js
npm notice 8.9kB dist/commands/configCommands.js
npm notice 14.6kB dist/commands/connectCommand.js
npm notice 5.5kB dist/commands/githubAppApi.js
npm notice 27.7kB dist/commands/githubAppCommands.js
npm notice 57.9kB dist/commands/goalCommands.js
npm notice 2.4kB dist/commands/imageCommands.js
npm notice 8.0kB dist/commands/implementCommands.js
npm notice 1.8kB dist/commands/index.js
npm notice 7.3kB dist/commands/initCommands.js
npm notice 14.1kB dist/commands/initStack.js
npm notice 6.1kB dist/commands/logCommands.js
npm notice 24.9kB dist/commands/planCommands.js
npm notice 8.4kB dist/commands/relayCommands.js
npm notice 38.6kB dist/commands/repoCommands.js
npm notice 2.7kB dist/commands/repoValidate.js
npm notice 7.5kB dist/commands/runtimeCommands.js
npm notice 17.9kB dist/commands/settingCommands.js
npm notice 4.6kB dist/commands/setup/agentHostActions.js
npm notice 123B dist/commands/setup/agents.js
npm notice 4.5kB dist/commands/setup/engine.js
npm notice 51B dist/commands/setup/github.js
npm notice 21.4kB dist/commands/setup/hostActions.js
npm notice 3.2kB dist/commands/setup/imagePlatform.js
npm notice 27.3kB dist/commands/setup/sequential.js
npm notice 51B dist/commands/setup/state.js
npm notice 51B dist/commands/setup/types.js
npm notice 10.7kB dist/commands/setupCommand.js
npm notice 4.4kB dist/commands/stackCommands.js
npm notice 1.4kB dist/commands/startCommand.js
npm notice 3.7kB dist/commands/statsCommands.js
npm notice 13.5kB dist/commands/systemCommands.js
npm notice 3.5kB dist/commands/tankCommands.js
npm notice 46.3kB dist/commands/taskCommands.js
npm notice 29.7kB dist/commands/todoCommands.js
npm notice 31.0kB dist/commands/tunnelCommand.js
npm notice 2.7kB dist/commands/uiDocsCommands.js
npm notice 8.3kB dist/completion.js
npm notice 20.0kB dist/config/ConfigManager.js
npm notice 276B dist/config/index.js
npm notice 989B dist/config/rootKey.js
npm notice 345B dist/config/types.js
npm notice 46.0kB dist/connectIdentity.js
npm notice 25.0kB dist/connectRootAuthority.js
npm notice 32.5kB dist/connectWindowsAuthority.js
npm notice 2.2kB dist/desktopDiscovery.js
npm notice 13.2kB dist/desktopLocalSetup.js
npm notice 17.1kB dist/index.js
npm notice 4.5kB dist/native/darwin-authority-broker.c
npm notice 8.9kB dist/native/directory-operations.c
npm notice 50.1kB dist/native/prebuilds/darwin-arm64/connect-authority-broker
npm notice 54.2kB dist/native/prebuilds/darwin-arm64/directory-operations.node
npm notice 17.1kB dist/native/prebuilds/darwin-x64/connect-authority-broker
npm notice 24.3kB dist/native/prebuilds/darwin-x64/directory-operations.node
npm notice 28.9kB dist/native/prebuilds/linux-arm64/directory-operations.node
npm notice 17.4kB dist/native/prebuilds/linux-x64/directory-operations.node
npm notice 1.2kB dist/native/README.md
npm notice 3.1kB dist/orchestrator/format.js
npm notice 13.4kB dist/orchestrator/index.js
npm notice 302B dist/orchestrator/manifest.json
npm notice 121.0kB dist/orchestrator/orchestrator.mjs
npm notice 408B dist/orchestrator/types.js
npm notice 237B dist/skill/propr/agents/openai.yaml
npm notice 8.7kB dist/skill/propr/SKILL.md
npm notice 4.5kB dist/tui/AgentTableApp.js
npm notice 4.5kB dist/tui/app.js
npm notice 11.6kB dist/tui/CheckApp.js
npm notice 5.1kB dist/tui/render.js
npm notice 32.5kB dist/tui/SetupApp.js
npm notice 18.4kB dist/tui/SetupApp.test.js
npm notice 8.2kB dist/tui/StartApp.js
npm notice 3.6kB dist/utils/apiErrorPresentation.js
npm notice 12.0kB dist/utils/directoryDescriptor.js
npm notice 739B dist/utils/dockerPort.js
npm notice 5.0kB dist/utils/envFile.js
npm notice 520B dist/utils/index.js
npm notice 5.7kB dist/utils/io.js
npm notice 717B dist/utils/localSetupPlatform.js
npm notice 1.5kB dist/utils/nativeArtifact.js
npm notice 544B dist/utils/parseState.js
npm notice 417B dist/utils/positiveInteger.js
npm notice 4.5kB dist/utils/privateFilesystem.js
npm notice 4.2kB dist/utils/resolveProject.js
npm notice 7.2kB dist/vendor/local-setup/agents.js
npm notice 63.0kB dist/vendor/local-setup/engine.js
npm notice 5.0kB dist/vendor/local-setup/envFile.js
npm notice 9.1kB dist/vendor/local-setup/github.js
npm notice 188B dist/vendor/local-setup/index.js
npm notice 27.5kB dist/vendor/local-setup/publicInstanceIdentity.js
npm notice 14.6kB dist/vendor/local-setup/state.js
npm notice 2.8kB dist/vendor/local-setup/types.js
npm notice 1.0kB dist/vendor/shared/accountStatusTimestamp.js
npm notice 7.6kB dist/vendor/shared/activityEvents.js
npm notice 4.4kB dist/vendor/shared/agentDefinitions.js
npm notice 3.4kB dist/vendor/shared/agentLogin.js
npm notice 3.1kB dist/vendor/shared/agentTank.js
npm notice 2.8kB dist/vendor/shared/analyticsTimeframe.js
npm notice 2.0kB dist/vendor/shared/antigravityCompatibility.js
npm notice 5.1kB dist/vendor/shared/apiOrigin.js
npm notice 3.5kB dist/vendor/shared/assignment.js
npm notice 9.3kB dist/vendor/shared/automationDefinitions.js
npm notice 8.5kB dist/vendor/shared/connectDiscovery.js
npm notice 9.6kB dist/vendor/shared/cronSchedule.js
npm notice 254B dist/vendor/shared/demoMode.js
npm notice 4.3kB dist/vendor/shared/desktopPairing.js
npm notice 481B dist/vendor/shared/desktopTokenRevocation.js
npm notice 8.9kB dist/vendor/shared/events.js
npm notice 2.5kB dist/vendor/shared/githubAppManifest.js
npm notice 1.6kB dist/vendor/shared/githubAuthMode.js
npm notice 2.0kB dist/vendor/shared/githubEventIntakeMode.js
npm notice 11.6kB dist/vendor/shared/goalBlockers.js
npm notice 6.0kB dist/vendor/shared/goalCheckpoints.js
npm notice 4.0kB dist/vendor/shared/goalCreation.js
npm notice 4.9kB dist/vendor/shared/goalWait.js
npm notice 12.5kB dist/vendor/shared/index.js
npm notice 214B dist/vendor/shared/instanceAuthorization.js
npm notice 54B dist/vendor/shared/instanceCatalog.js
npm notice 244B dist/vendor/shared/instanceStorage.js
npm notice 4.0kB dist/vendor/shared/intakeModePrerequisites.js
npm notice 2.9kB dist/vendor/shared/labelUtils.js
npm notice 16.6kB dist/vendor/shared/modelDefinitions.js
npm notice 3.5kB dist/vendor/shared/notificationLinks.js
npm notice 51.3kB dist/vendor/shared/notifications.js
npm notice 7.5kB dist/vendor/shared/previewStorage/v1.js
npm notice 866B dist/vendor/shared/projectSlug.js
npm notice 3.8kB dist/vendor/shared/proprCompatibility.js
npm notice 13.0kB dist/vendor/shared/proprServiceUrls.js
npm notice 16.6kB dist/vendor/shared/prTemplate.js
npm notice 2.2kB dist/vendor/shared/publishedVisualPreviews.js
npm notice 2.6kB dist/vendor/shared/reasoningLevels.js
npm notice 1.2kB dist/vendor/shared/repositoryIcon.js
npm notice 1.4kB dist/vendor/shared/repositoryIconUrl.js
npm notice 3.9kB dist/vendor/shared/repositoryPresentation.js
npm notice 9.5kB dist/vendor/shared/reviewContextBudget.js
npm notice 5.8kB dist/vendor/shared/reviewFeedbackIds.js
npm notice 1.7kB dist/vendor/shared/reviewPrompt.js
npm notice 907B dist/vendor/shared/runCostCap.js
npm notice 861B dist/vendor/shared/sessionSecret.js
npm notice 603B dist/vendor/shared/statusKeys.js
npm notice 7.5kB dist/vendor/shared/syntheticAgents.js
npm notice 2.2kB dist/vendor/shared/taskIdentifiers.js
npm notice 1.8kB dist/vendor/shared/taskLifecycle.js
npm notice 733B dist/vendor/shared/taskReplacement.js
npm notice 957B dist/vendor/shared/text.js
npm notice 9.8kB dist/vendor/shared/usageTips.catalog.json
npm notice 5.0kB dist/vendor/shared/usageTips.js
npm notice 335B dist/vendor/shared/usageTypes.js
npm notice 1.1kB dist/vendor/shared/userWhitelist.js
npm notice 758B dist/vendor/shared/validateRelayUrl.js
npm notice 2.2kB dist/vendor/shared/validateRoutingUrl.js
npm notice 7.1kB dist/vendor/shared/visualPreviewCapacity.js
npm notice 9.3kB dist/vendor/shared/voice.js
npm notice 222B dist/vendor/shared/workEvidence.js
npm notice 675B package.json
npm notice Tarball Details
npm notice name: propr-cli
npm notice version: 0.9.0
npm notice filename: propr-cli-0.9.0.tgz
npm notice package size: 463.2 kB
npm notice unpacked size: 1.9 MB
npm notice shasum: 1aef2f4709be684fa9f5dd7be80bbaeaf56b4a03
npm notice integrity: sha512-Sgzu1IF7pYPIs[...]zomIrMqZwXmRA==
npm notice total files: 184
npm notice
propr-cli-0.9.0.tgz

Dry run only. Re-run with --publish to publish to npm.
✅ propr-cli release package verified
Starting changed-area validation process...
Reusing this job's @propr/shared build from CLI packaging.
Reusing this job's @propr/local-setup build from CLI packaging.

--- Core Service: Lint & Build ---
✅ Core Lint passed
✅ Core Source Build passed

--- UI: Typecheck, Lint & Build ---
✅ Client Package validation passed
✅ UI Typecheck passed
✅ UI Lint passed
✅ UI Build passed

--- Docs: Typecheck & Build ---
✅ Docs Typecheck passed
✅ Docs Build passed

--- Core Package: Build & Lint ---
✅ Core Package Build passed
❌ Core Package Lint FAILED

/home/runner/work/propr/propr/packages/core/src/diagnostics/managedLogSpool.ts
  113:5  warning  Method 'measureNativeState' has too many parameters (5). Maximum allowed is 4  max-params

/home/runner/work/propr/propr/packages/core/src/diagnostics/nativeLogPolicy.ts
  26:8   warning  Function 'configuredNativeLogRoots' has a complexity of 26. Maximum allowed is 20  complexity
  84:25  warning  Blocks are nested too deeply (5). Maximum allowed is 4                             max-depth
  93:25  warning  Blocks are nested too deeply (5). Maximum allowed is 4                             max-depth
  98:31  warning  Blocks are nested too deeply (5). Maximum allowed is 4                             max-depth

/home/runner/work/propr/propr/packages/core/src/diagnostics/providerCollector.ts
  84:90  warning  Arrow function has a complexity of 22. Maximum allowed is 20  complexity

✖ 6 problems (0 errors, 6 warnings)

ESLint found too many warnings (maximum: 0).

--- CLI: Lint ---
✅ CLI Lint passed

--- API: Build & Lint ---
✅ API Build passed
✅ API Lint passed

--- API Reference: OpenAPI Spec & Client Contract ---
✅ OpenAPI spec is current and valid
✅ @propr/client matches the OpenAPI spec

--- Stage outcomes ---
Workflow lint: success
Release shell lint: success
Pre-setup gate: skipped
Node setup: success
Toolchain: success
Dependency install: success
Release metadata: success
CLI packaging: success
Change detection: success
Changed-area checks: failure

View Workflow

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate Changes

Please investigate and fix this CI failure.

Failure evidence

.github:8
Process completed with exit code 1.

.github:401
Process completed with exit code 1.

.github:441 — 🎭 Playwright Run Summary
360 passed (16.6m)

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 609d55b

Processed 2 comments:

  • Comment 1 by @github-actions[bot] (ID: 6130997472✓)
  • Comment 2 by @propr-dev[bot] (ID: 6130997558✓)

Summary of Changes

Fixed all six reported lint warnings by refactoring the three diagnostics files while preserving safety checks and accounting behavior.

Validation passed: zero-warning diagnostics lint, core and root builds, and 51 focused tests. One opt-in live-provider test was skipped. Two existing warnings remain in untouched files; CI excludes those files.

No visual preview was needed.


🤖 Implementation Details

  • Model: GPT-6.1 Sol (medium)
  • Requested By: @github-actions[bot], @propr-dev[bot]
  • Time: 4m 33s
  • Tokens: 607,917 (604,650 in / 3,267 out)
  • Cost: $0.18

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment IDs: 6130997472✓, 6130997558✓

@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/fix Resolve the current-head Core Package Lint failure only. The sanitized Validate Changes artifact reports 6 warnings with max-warnings=0:\n- managedLogSpool.ts:113 max-params on measureNativeState (5 > 4)\n- nativeLogPolicy.ts:26 complexity 26 > 20\n- nativeLogPolicy.ts:84,93,98 max-depth 5 > 4\n- providerCollector.ts:84 complexity 22 > 20\nRefactor without weakening the diagnostic-byte admission, protected session/database reporting, fail-closed safety, or existing tests.

…ee diagnostics files while preserving safety checks and accounting behavior.

Fixed all six reported lint warnings by refactoring the three diagnostics files while preserving safety checks and accounting behavior.

Validation passed: zero-warning diagnostics lint, core and root builds, and 51 focused tests. One opt-in live-provider test was skipped. Two existing warnings remain in untouched files; CI excludes those files.

No visual preview was needed.

PR: #3027
Comment by: @github-actions[bot] (ID: 6130997472)
Comment by: @propr-dev[bot] (ID: 6130997558)
Model: GPT-6.1 Sol
@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

ℹ️ No review findings or suggestions were selected.

No files were changed because this /fix command resolved to no review record.

Name at least one F# finding or S# suggestion from a current review comment, for example /fix F20 S3. Use /fix all to request every pending finding and suggestion. Any text after the identifiers, and every line below the command, is passed through as instructions.

View Task Execution


Processing comment ID: 6131011135✓

@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/review claude-opus

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — claude-opus

⚠️ Review output was invalid and could not be displayed safely.


🤖 Review Details

  • Model: Claude Opus 5.5
  • Time: 2m 59s
  • Tokens: 126,912 (113,295 in / 13,617 out)
  • Cost: $0.84

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

🤖 Review by ProPR

@integry

integry commented Oct 12, 2026

Copy link
Copy Markdown
Owner

/review claude-opus

@propr-dev

propr-dev Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — claude-opus

Overall Evaluation

This PR implements the protected/unbounded fallback that issue #3015 allows. Native provider originals are never rotated, truncated or deleted. Instead, the PR adds:

  • classified metadata inventories that separate diagnostic, session, database, auth-config and unknown files;
  • a declared-root launch gate in managedLogRuntime.assertNativeLogAdmission;
  • a physical Docker mount gate in nativeLogAdmission.ts, wired into prepareAdmittedAgent, both before admission and again after the entitlement wait;
  • an operator CLI path to reset capacity, plus explicit local-only copy disposal.

The task, Codex app-server, Claude-goal and Antigravity-goal launchers all call the declared gate before network and Docker admission. Refusal throws before queued input is marked delivered, so resumable sessions and pending input survive.

I traced the changed control paths and found no PR-introduced defect that I could drive to a demonstrated incorrect outcome. Some design choices create operational friction; they are listed as suggestions. Validate Changes is still pending, and its previous run failed on lint in exactly these files. The current diff appears to address each reported rule:

  • measureNativeState now takes an options object.
  • validateNativeLogRoot is extracted from configuredNativeLogRoots.
  • readCommittedRecords is extracted from collectProvider.

Merge readiness is conditional on that check passing.

✅ Capacity counts only diagnostic bytes — nativeFileClass separates diagnostic files from session, database and auth files. Both capacityBytesLowerBound (in recordNativeInventory) and diagnostic_bytes (in measureNativeState) count only diagnostic-class bytes. A large session or database therefore never blocks launches by itself, and the session-dominated-homes test exercises this across all five layouts.

✅ Re-check before the container is created — prepareAdmittedAgent re-runs assertNativeLogAdmission(createArgs) after acquiring the entitlement and before runtime.create. The test that grows a file during acquire shows the refusal leaves no container to create or remove.

✅ Refusal leaves native files and copy obligations untouched — resetNativeCapacity clears only the measurement columns and keeps cursors, gaps and unacknowledged segments. The tests check that exported segments, transcripts and credential canaries are unchanged after refusals and resets.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S33: 🟢 Unknown directories make diagnostic high-water sticky

The new else branch in collectProvider (packages/core/src/diagnostics/providerCollector.ts, the visitEntry fallback) sets inventoryIncomplete = true for any non-allowlisted directory. measureNativeState then keeps max(previous, current) for diagnostic_bytes.

Real Claude homes always contain unknown directories such as todos/ or shell-snapshots/. Those homes can therefore never produce a "complete" scan. If a debug/ log once exceeds 256 MiB and the operator later deletes it, launches stay refused until someone runs reset-native-capacity manually.

Diagnostic-class files can only live under allowlisted directories, so an unknown directory does not make the diagnostic count a lower bound. Tracking a separate "diagnostic coverage complete" flag, false only for scan limits or deadlines, would let normal remediation release capacity. This behaviour is documented and tested as intended, so it is not a blocker.

S34: 🟢 Explicit error when the spool is unavailable

nativeLogAdmission.ts uses managedDiagnostics()!. With PROPR_MANAGED_LOGS=1 and an invalid binding or unavailable spool, every docker run fails with an opaque TypeError instead of a constant "operator action required" message. Failing closed is intended. An explicit if (!spool) throw new Error('managed diagnostics: status storage unavailable; operator action required') would match the declared-root gate and make the cause easier to diagnose.

S35: 🟢 Malformed root declaration aborts the whole sweep and status

The daemon calls nativeDiagnosticStatus() before the per-agent loop in src/daemon/managedDiagnostics.ts. configuredNativeLogRoots throws on malformed JSON or bad ownership, so the entire sweep is skipped, including mount measurements that the physical gate relies on. The CLI status command also exits with failure, which removes Fleet's visibility exactly when misconfiguration needs reporting.

Isolating the declared-root inventory in its own try/catch, and reporting a nativeAdmission.status: 'misconfigured', would keep the rest working.

S36: 🟢 Synchronous scan cost on the launch path

Each launch can run up to 2 s of synchronous declared-root traversal, plus up to 16 × 250 ms of physical mount scans, plus a repeat after entitlement acquisition. All of this runs on the worker event loop. That is bounded, but it delays heartbeats and stream handling on busy workers. Consider caching recent inventories per root for a short TTL, or measuring the actual cost under realistic root counts.

S37: 🟢 Two parallel local-disposal interfaces

discardLocal (gated by PROPR_DIAGNOSTIC_LOCAL_ONLY) and disposeLocal (gated by PROPR_DIAGNOSTIC_DISPOSAL=local-only) duplicate the same operation with different flags, reasons and idempotency semantics. They also differ in two details:

  • disposeLocal does not require ack=0, so a segment that was acknowledged but not yet pruned could be recorded as a loss.
  • disposeLocal does not call prune.

Consolidating them, or deprecating one, would reduce the operator surface and the documentation burden.

S38: 🟢 Ownership-mismatch refusals need a clearer reason

The physical gate converts any unsafe-source into a launch refusal (rejectUnsafe), and PinnedDirectory.file requires the file's uid to match its directory's uid. Containers launched with --user 0:0 (for example OpenCode) could leave root-owned allowlisted files under app-owned directories, which would refuse every launch. I could not verify this happens with current entrypoints. A distinct status reason or log line for ownership mismatch would make such refusals actionable.

S39: 🟢 Cost-cap-exempt runs skip the physical gate

In dockerExecutor.startDockerCommand, prepareAdmittedAgent (and therefore the mount gate) runs only when !options.costCapExempt; exempt runs get only the declared-root check. If exempt runs mount provider homes, consider calling the physical assertNativeLogAdmission(args) on that path too.

S40: 🟢 Check callers of report(..., 'protected-native-state', bytes)

report now writes the same value to both protected_bytes and diagnostic_bytes. Any existing caller that passes total protected bytes (including session bytes) would reintroduce session-driven refusals, against the diagnostic-only invariant. Confirm the callers, or set diagnostic_bytes only from a classified inventory.

Score

The implementation meets the issue's protected/unbounded fallback, gates every launch path (task, goal and physical) before Docker admission, and preserves sessions, pending inputs and copy obligations on refusal. No verified blockers remain, but readiness depends on the pending Validate Changes check, which previously failed on lint in these files.

Score: 8/10


🤖 Review Details

  • Model: Claude Opus 5.5
  • Time: 3m 3s
  • Tokens: 126,150 (112,354 in / 13,796 out)
  • Cost: $0.84

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S33 S34 S35 S36 S37 S38 S39 S40

🤖 Review by ProPR

@integry
integry merged commit 65f57ca into main Oct 12, 2026
45 checks passed
@integry
integry deleted the 3015/gpt-6.1-sol-safely-bound-original-man-20261012-1705-t9w branch October 12, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Safely bound original managed provider diagnostic logs without losing resumable sessions

2 participants