Repository navigation
CRW-178 후속 · 캐시 교체 때 실행 중 작업의 브리지·스킬 경로 실측 반영 - #148
Merged
Merged
Conversation
…running tasks The cache-lifetime table labelled two host-owned rows as inference. One package replacement on a real host measured both: the App Server started bridges again from the new version directory, each under the bridge record as it stood then, and a turn in progress kept the removed skills root until it ended while the next turn was given the new one. The rows, the supported-range table and the prose around them now say so, with measured and inferred kept apart. An isolated Codex home answers whether the policy-free restart recurs: the record carries no version directory, so a new directory launcher reads the same version-2 record and starts the bridge under its policy; a version-1 record reproduces the host case, and no record, a changed policy file or a pre-version-2 launcher fail closed. Updating safely now gives the order for a payload-changing update, including a pre-add probe of the candidate package and the first policy registration, and runtime-install and plugin-transition point to it. Docs only; nothing under plugins/crw changes.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Review of #148: the hook rerun that refreshes the Stop fallback needs --dest (or --relay-command), as the settings builder refuses without one. Also: step 2 sends a version-1 host to step 8 before step 5, step 5 names the directory to check, the /proc reading says it only sees processes it may read, and the registration order notes the measured replacement needed no restart.
Devin review of #148: the /proc reading matched only the crw marketplace, while the procedure installs crw@<marketplace>, and it skipped bridge processes it could not read. It now parses <marketplace>/crw/<version> under the plugin cache and lists an unreadable bridge process as UNREADABLE. The measured-replacement subsection names the App Server version.
…he payload readback Review of #148: one process started after the record was written exited before its policy state could be read, so the claim covers the bridges whose state was read. Step 6 now says which directories check-declaration compares.
Owner
Author
|
Merge-readiness handoff for head
|
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.
Change
CRW-178 (#92) left two rows of the cache-lifetime table in
docs/plugin-packaging.mdlabelled as inference. One package replacement on a real host has since measured both, and one of them was wrong:cwd/args. Before: "a server already running survives … a restart inside that session is expected to fail" (inferred). Measured: about a minute aftercodex plugin add, the App Server started twelve new bridge processes from the new version directory without restarting itself, and each ran under the bridge record as it stood then. The record was still version 1, so those bridges check no role pair, and ten were still running that way an hour and a half later. That the add caused the restart stays labelled as inferred from timing.Does the policy-free restart recur at the next replacement? From source and an isolated run: not while the record is version 2, its policy file is unchanged, and the new package's declared server reads version 2 as the current launcher does. The launcher finds the Codex home six directories above its own file and reads
crw-bridge-mcp.jsonthere; no record field ties it to a version directory or a payload. In an isolated Codex home (real codex-cli 0.154.0plugin addof one payload,register-mcpwriting version 2, then a different payload added over it, which removed the first directory), the new directory's declared launcher, started with only the App Server's six environment variables, handed the bridge the recorded policy:get_capabilitiesreportedallowlistwith the recorded digest, and aregister-mcprerun answeredrecord_unchanged. A version-1 record reproduces the host case (presence_only, no roles). No record, a changed policy file, and a rollback to a launcher older than version 2 each exit 2 and start no bridge. The two payloads shipped identical launcher bytes, so a candidate whose declared server differs is outside that measurement, which is why the procedure now probes every candidate before adding it.Docs only; nothing under
plugins/crw/,scripts/orpackages/changes, so the payload and its version are unchanged.docs/plugin-packaging.md: the two rows; a new subsection, "What one replacement measured"; the supported-range table (column "MCP restart" becomes "MCP bridge") and the paragraph after it; and "Updating safely", rewritten as the operator order for a payload-changing update. The order runs: dry-runregister-mcpagainst the current record; place the Stop fallback; probe the candidate in a throwaway Codex home (register-mcp --codex-home <throwaway>without--applystarts the candidate's declared server with a version-2 record, and the add proceeds only onrecord_would_createwith one cached version declaringcodex-thread-bridge); add and re-trust; read back with the dry run,get_capabilities, and a/procreading of every running bridge's directory and policy digest. It then covers what tasks loaded before the replacement keep, and the first policy registration: a version-1 record cannot take a policy in place, so the choice is when it moves aside, with each order's measured and unmeasured cost. The sentences in "Turning the wired surfaces on", "Adding a skill" and "Update and roll back" that the measurement refines are updated, and a rollback note says an older launcher refuses a version-2 record.docs/runtime-install.md: the registration-order paragraph now says what a bridge started before the registration runs under, for each record state. A new paragraph states the replacement behaviour and the recurrence answer.docs/plugin-transition.md:## Updatepoints to the payload-update order.Verification
Local, on this head:
python3 scripts/ci/validate.py: ok. It reads local link paths in the three docs, not fragments.git diff --check origin/dev...HEADis clean, andgit diff --name-only origin/dev...HEAD -- plugins/crw scripts packagesis empty.python3 scripts/ci/plugin.py: payload0.4.0+1ed13de2edbb, 218 files, unchanged.python3 scripts/runtime_install.py verify-definition:ok: true./procsnippet in step 6 runs as printed (read-only) on the measured host and lists each crw bridge with its version directory and policy state.The isolated measurement ran in a bwrap sandbox where only the scratch run was writable. It used real
codex plugin marketplace add/removeandplugin add,register-mcpfrom this checkout, the bridge frompackages/codex-thread-bridge, and a stub that answers App Serverinitializeand nothing else. The pre-add candidate probe was measured the same way: a current-launcher candidate answeredrecord_would_create, the 0.4.0 candidate answeredlauncher_predates_policy, and neither left a record. Receipts are kept with the task record, outside this repository.Hosted CI and the independent review are reported in the PR conversation, against the exact head each one read.
Risks and remaining work
codex plugin addwas measured once, on one host. The isolated run shows what a restarted bridge reads, not whether or when the host restarts it.