Repository navigation
Gate agent sessions on configurable host resources - #1206
Merged
Merged
Conversation
Keep the host resources documentation alongside the refreshed Console links, and retain compact --plan-only help including email-unless-merged.
This was referenced Oct 24, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
thirdshift resources [--json]and the Console's Resources page (9org e) show the same measurements, limits and admission decision. Reload the page for a fresh snapshot. Configure minimum available memory in decimal MB and maximum load per CPU as a percentage;0disables each limit. Resumes, Repairs, Security reviews, release summaries and preflight Model test calls use the gate. Issue trust is checked after a work session's wait.Closes #1152
Test seams
resourcescommand and authenticated Console HTTP view.Evidence
resourceswas not a command; the session test showed a Harness starting despite an impossible memory threshold. Spec finding S1's exact isolated reproduction failed (exit 101): OpenCode ranReply with OK.before resource admission.After: The same S1 command passes (exit 0), and its regression test is retained as
resource_limits_block_opencode_probe_sessions_too. Focused tests cover threshold equality/independent limits, config validation, waiting/recovery, Resumes, interruption, all three Model-probe entry points, Console reload and sign-in protection.cargo checkandcargo clippy --all-targets -- -D warnings: passed./tmp/thirdshift-1152-resources.png.NEXTEST_TEST_THREADS=8 /usr/bin/time -p scripts/affected-tests main: passed — 2,427 Rust tests (57 skipped) and all 49 public-site tests. Warm cache, compilation included; selector wall time 1,162.88s, Rust execution 1,066.80s.Unaddressed findings
Standards
None skipped. No findings.
Spec
None skipped. S1 was reproduced, fixed in
285a078, and verified with the reviewer's unchanged command.Security
No unaddressed findings introduced by this change. Security review of the diff against main (resource gating in
src/resources.rs,src/session.rs, harness probes,thirdshift resourcesCLI, and the read-only Console Resources page behind the existing auth guard with the sharedframe-ancestors 'none'CSP) found no reachable cross-boundary violation: limits come from the owner's User config (nonnegative integers, unknown keys rejected), admission reasons render only numbers,observereads only RAM/CPU inventory plusgetloadavgwith return/finiteness checks, andwaitrechecks config on a ten-second pause with interrupt handling. No proof-of-concept test fails on HEAD, so no fix was made and no regression test was added by this review.Security review outcome
No unaddressed introduced findings.
Review coverage
Both independent reviewers inspected the 28 changed files through
285a078againstmain, including generatedsite/docs/index.htmldirectly and the Model-probe fix. No generated output was excluded. After review, the help-only hunk insrc/main.rscondensed existing text to retain the tested 65-line help limit; it was inspected locally and verified withcargo test --test command_surface help_is_a_compact_reference_with_a_link_to_the_details.The final
src/config.rscomment/test-only hunks add explicitdefault 0wording and the two resource keys to the existing config inventory assertion; these hunks were also added after independent review.Unread changed files under both Standards and Spec:
tests/setup.rsandsrc/setup.rs. Their changes were added after the reviews to update two expected section lists for[resources], assert both limits default to zero, and include the limits in an existing complete-config unit fixture. Reports, with each axis's combined files-read list and these coverage notes, are retained at.thirdshift-review-xiEaBt/standards.mdand.thirdshift-review-xiEaBt/spec.mdin the Session evidence.Merge Danger
Door: two-way
Blast Radius: sessions
Limits default to disabled. Configured limits delay new sessions and do not stop running sessions. Measurements are host snapshots, without capacity reservations or container quota accounting. The existing Spec parallel limit still applies.
Built with codex · gpt-6.1-sol · xhigh