Repository navigation
test(planning): check pending live port leaks by JSON value, not substring - #9245
Conversation
…tring The guest/leader leak check searched json.dumps(state) for "5173", which matched the host's joinedAt timestamp (1792710102.8151734) and failed main at 20f70f2. port_leaks walks the parsed state and flags only string values, keys, or integers that carry the port; the owner snapshot pairs it as the positive case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #9245 at 876ef66Result: no security findings. The PR changes only a test file ( What the change does. It replaces a raw substring search for the port in the guest and leader Does the test still catch a leak? I checked whether the new check is weaker in a way that could hide a real leak of a pending live port to a guest or leader.
I found no exploitable path, no secret or credential handling, and no injection surface. |
|
claude-review reviewed No findings on 876ef66. I read the full diff (the new
|
… the lane can commit (#9268) No related issue: fix-docs report failure on #9245, run 39874313435 ## Summary In [run 39874313435](https://github.com/melodic-software/claude-code-plugins/actions/runs/39874313435), job "fix-docs / report" on PR #9245 failed. The run job gated no head SHA, so its `can-commit` output was empty. The report job's `signed` step gated on `can-commit != 'false'`, which an empty value passes. It ran `check-signed-commits` with an empty `since-sha`, warned "could not verify the lane's commits (the PR's head never matched its branch)", then failed the job when the label escalation got a 403 on `POST .../issues/9245/labels`. ## Fix In `.github/workflows/pr-run-activity-read.yml`, the `signed` step now runs only when `needs.run.outputs.can-commit == 'true'` and `steps.head.outputs.sha != ''`; the PR number and not-forged conditions are kept. No read-runner caller has `can-commit` true. The read workflow fails red on any effect but `read` (`effect-not-read`), the read effect grants `contents: read`, and `resolve-config.mjs:260` sets `can-commit` to `String(grant.contents !== "read")`, so it is `false` whenever config resolves and empty otherwise. The `fix-ci`, `fix-docs` and `resolve-issue` activities all forbid `mutate-branch`. The step is kept, not deleted, so a future read-runner activity with a write grant stays covered. `pr-run-activity-write.yml` has the same `!= 'false'` shape but gates on `pr-number != ''`, and its activities can commit, so it is a different context and is unchanged. ## Verification - New test in `.github/actions/resolve-config/callers.test.mjs` evaluates the step's `if` for `can-commit` `true`, `false` and empty, an empty head SHA, an empty PR number and a forged head. It fails on the old gate (`can-commit ''`) and passes on the new one. - `callers.test.mjs`: 102 pass. `check-signed-commits` tests: 33 pass. `actionlint` on the workflow: clean. - `scripts/check-affected.sh --tests`: 9 passed, 5 skipped (no markdown, shell, plugin, Python or skill changes). - No changelog fragment: no plugin or convention file changed. ## Related - Failing run: https://github.com/melodic-software/claude-code-plugins/actions/runs/39874313435 - PR #9245 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
No related issue: fixes main red at 20f70f2 (run 39868709973)
Summary
TestLiveRoutes::test_a_pending_entry_url_reaches_the_owner_and_never_a_guest_or_leaderfailed main in run 39868709973. It ranassertNotIn("5173", json.dumps(state))over the guest's state, and the substring matched the host'sjoinedAttimestamp1792710102.8151734. The guest'sliveswas[], so nothing leaked.Session._lives_view(plugins/planning/shared/session.py:4049-4067) gives non-owners only{id, label, status: {kind}}, plusurlonce the entry runs.Fix
port_leaks(doc, port)test helper walks the parsed state and returns the JSON path of every string value or key that contains the port's digits, and every integer equal to the port. Floats such as timestamps never count.port_leaks(...) == []. The owner snapshot is checked as the matching positive case: it must leak at exactly$.lives[0].target.portand$.lives[0].url.TestPortLeaksshows that a timestamp holding the port's digits trips a raw substring search but not the helper. It also shows the helper catching a URL, ahost:portstring, an integerportfield, a stringportfield, and a key.Verification
plugins/planning/shared/tests/test_server.py3 times on Python 3.14 with.github/requirements-ci.txt: 270 passed each time._lives_viewhand gueststargetfor every entry fails the new assertion (['$.lives[0].target.port'] != []).scripts/run-ruff.sh checkpasses. The pre-pushcheck-affectedhook passed.Related
🤖 Generated with Claude Code