Skip to content

Add strict-idle guard snapshot-only command - #163

Merged
chrisohearn merged 7 commits into
integration/mcp-events-20261109from
fix/guard-snapshot-only-20261127
Nov 27, 2026
Merged

chrisohearn merged 7 commits into
integration/mcp-events-20261109from
fix/guard-snapshot-only-20261127

Conversation

@chrisohearn

@chrisohearn chrisohearn commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a guard-owned, snapshot-only host command for dot-t3code-mcp#178, following #455. The host guard owns the stopped-database receipt and never installs, selects, activates, or publishes another release.

The server publishes a guard-compatible admission capability. The external transient user-service executor can close admission and wait for already admitted commands to drain without running inside the live T3 service that may be restarted. The host guard then requires the trusted, healthy fork build to be bound to its systemd invocation and listener child in the exact cgroup, a complete strict-idle census, two idle checks and 15 minutes of quiet, and the kernel hang guard. It captures SQLite plus WAL/SHM under the existing service-change lock, restarts only that same trusted fork build, and writes an owner-only durable receipt with file hashes and service generations. Operation retries with an existing receipt do not stop or copy again.

Verification

  • vp run check:changed integration/mcp-events-20261109 --concurrency 1 --timeout 1800 — passed on 3ee69c7dc70d599d44c0bf679dc12bb1e9970557
  • bash scripts/fork/host/t3-update-guard/test-guard.sh
  • bash -n for the guard and test harness
  • sh -n for the supported wrapper
  • git diff --check

Regression coverage includes a real listener child distinct from the launcher PID, server-side admission close/drain and rejection, preparing runs and background tasks, idle/fence races, prevalidated labels, quiet-window enforcement, durable receipts, same-fork restart, external executor, and operation-ID idempotency. All validation used isolated fixtures; no live service stop, snapshot, or migration was performed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T16:15:09.319499Z f41b18d New commits
🔒 Security Review ✅ Completed 2026-11-27T16:12:43.812405Z f41b18d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8d5ac3ca51

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/fork/host/t3-update-guard/guard Resolved
Comment thread scripts/fork/host/t3-update-guard/guard Resolved
Comment thread scripts/fork/host/t3-update-guard/guard Resolved
Comment thread scripts/fork/host/t3-update-guard/guard Resolved
Comment thread scripts/fork/host/t3-update-guard/guard Resolved
Comment thread scripts/fork/host/t3-update-guard/guard Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1cb320aa59

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/fork/host/t3-update-guard/guard Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ee69c7dc7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/fork/host/t3-update-guard/guard Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e10a76b44

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/fork/host/t3-update-guard/guard Resolved
Comment thread scripts/fork/host/t3-update-guard/guard Resolved

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85f870fb46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85f870fb46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 85f870fb46

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee392fa387

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/fork/host/t3-update-guard/guard Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f41b18d064

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1149 to +1150
if kill -0 "$pid" 2>/dev/null; then
count=$((count + 1))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bind admission tokens to the server incarnation

After the server crashes while an admission is active, its token remains on disk and contains only the server PID (serviceChangeAdmission.ts:411-415). If Linux reuses that PID for any unrelated long-lived process before the next snapshot, this kill -0 check permanently counts the stale token as active, so every snapshot waits 120 seconds and fails even though no command is running. Record and verify the server boot ID and process start ticks on tokens, as the fence protocol now does.

AGENTS.md reference: AGENTS.md:L131-L141

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Tracked as #164. The finding is genuine: an admission token with a reused PID can make strict snapshot attempts fail closed after the 120-second wait. It is a non-blocking P2 under the normal finding cutoff, so it is tracked separately from this delivery. The review thread remains open until the token identity is fixed.

@chrisohearn
chrisohearn merged commit 99e2e11 into integration/mcp-events-20261109 Nov 27, 2026
20 checks passed
@chrisohearn
chrisohearn deleted the fix/guard-snapshot-only-20261127 branch November 27, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant