Skip to content

refactor(codex): share node catalog record lookup - #141235

Merged
steipete merged 1 commit into
mainfrom
codex/refactor-node-catalog-lookup-01a0750a
Sep 7, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/refactor-node-catalog-lookup-01a0750a

Conversation

@steipete

@steipete steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Continuing a Codex session on a paired node and opening its terminal maintain separate copies of the same bounded catalog lookup. Changes to RPC arguments, response parsing or cursor handling currently have to remain synchronized across both copies.

Why This Change Was Made

One private plugin helper now owns the sequential request, real page parser, first matching record and bounded cursor traversal. Both old lookup functions are removed, along with a private parser parameter whose sole production caller always supplied the canonical parser. Continuation and terminal operations retain their distinct eligibility checks and error messages.

User Impact

Behavior is unchanged. Lookup keeps the same node command, scopes, 100-item pages, 100-page maximum, 65-second request timeout, cursor-cycle handling and first-match ordering. Active interactive sessions remain eligible for terminal opening; continuation keeps its existing state restrictions. The maintainer-requested consolidation removes 27 production code lines (28 physical lines), with no test changes or new public API.

Evidence

All 40 existing node-listing and continuation tests pass before and after. A further 666 comparisons use the real helper, parser and response unwrapping to verify both callers across direct, payload and payloadJSON responses, including page 100, malformed or archived rows, cycle/match ordering and exact error causes. All 24 selected checks and independent P2 review pass.

The relevant upstream Codex listing request/response contract was inspected directly. Verification here uses synthetic transport plus existing provider-boundary tests; it does not claim a live Gateway, paired-node or Codex request. No runtime dependency or package-export change is introduced.

@clawsweeper

clawsweeper Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete steipete self-assigned this Sep 7, 2026
@steipete
steipete marked this pull request as ready for review September 7, 2026 13:12
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 9:18 AM ET / 13:18 UTC.

ClawSweeper review

What this changes

Shares the paired-node Codex session lookup between continuation and terminal opening while preserving their separate eligibility checks and error messages.

Merge readiness

✅ Ready for maintainer review

The consolidation remains useful: inspected main still contains both lookup implementations. No introduced correctness or security defect was found, and this maintainer-authored PR is protected from automatic closure.

Priority: P3
Reviewed head: 26654e69d624f8e2da81d74c007b49af11e5982d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable extraction with preserved caller semantics and no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer exemption applies to this behavior-preserving extraction. Reported checks exercise synthetic transport through the helper and parser; they do not establish live paired-node behavior, and no material authority change requires additional proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer exemption applies to this behavior-preserving extraction. Reported checks exercise synthetic transport through the helper and parser; they do not establish live paired-node behavior, and no material authority change requires additional proof.
Evidence reviewed 9 items Introduced scope verified: The complete host-pinned merge-base-to-head patch contains only the shared lookup extraction and its two callers. The verified test merge likewise changes only those four files; unrelated endpoint drift is not attributed to this PR.
Lookup invariants preserved: The helper retains sequential requests, agent and node identifiers, operator.write scope, existing timeout and page bounds, canonical parsing, first-match ordering, and cursor-cycle detection.
Caller behavior and private boundary: Continuation maps missing and cyclic results to its existing errors and retains its state restrictions. Terminal opening retains interactive-source checks and allows active interactive sessions. The removed parser parameter had one production caller supplying the canonical parser; these helpers remain private under extensions policy.
Findings None None.
Security None None.

How this fits together

The Codex plugin retrieves session records from paired computers before continuing a session or preparing a terminal launch. The shared lookup validates paginated responses and returns a matching record for each operation’s eligibility checks.

flowchart TD
  A[Continue session or open terminal] --> B[Shared bounded lookup]
  B --> C[Paired node catalog]
  C --> D[Validate page and find session]
  D -->|Next page| B
  D -->|Found| E[Operation eligibility checks]
  D -->|Missing or cursor cycle| F[Operation error]
  E --> G[Continue session or terminal plan]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -28. Total -28 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 4 67 95 -28
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 67 95 -28

Review metrics

None.

Technical review

Best possible solution:

Keep one private bounded lookup while leaving continuation and terminal eligibility policy with their respective callers.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR addresses duplicated implementation, which is directly visible in inspected main, rather than a reported runtime defect.

Is this the best way to solve the issue?

Yes. The private helper removes duplicate traversal without merging the callers’ distinct policy or expanding the public plugin API.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1b90029dbd75.

Labels

Label changes:

  • add P3: This is a bounded internal consolidation with no intended user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer exemption applies to this behavior-preserving extraction. Reported checks exercise synthetic transport through the helper and parser; they do not establish live paired-node behavior, and no material authority change requires additional proof.

Label justifications:

  • P3: This is a bounded internal consolidation with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer exemption applies to this behavior-preserving extraction. Reported checks exercise synthetic transport through the helper and parser; they do not establish live paired-node behavior, and no material authority change requires additional proof.

Evidence

What I checked:

  • Introduced scope verified: The complete host-pinned merge-base-to-head patch contains only the shared lookup extraction and its two callers. The verified test merge likewise changes only those four files; unrelated endpoint drift is not attributed to this PR. (26654e69d624)
  • Lookup invariants preserved: The helper retains sequential requests, agent and node identifiers, operator.write scope, existing timeout and page bounds, canonical parsing, first-match ordering, and cursor-cycle detection. (extensions/codex/src/session-catalog-node-lookup.ts:22, 26654e69d624)
  • Caller behavior and private boundary: Continuation maps missing and cyclic results to its existing errors and retains its state restrictions. Terminal opening retains interactive-source checks and allows active interactive sessions. The removed parser parameter had one production caller supplying the canonical parser; these helpers remain private under extensions policy. (extensions/codex/src/session-catalog-node-continue.ts:272, 26654e69d624)
  • Still useful on main: Inspected fetched main retains resolveNodeCatalogEligibleThread and the separate continuation lookup. No equivalent consolidation or merged replacement was established. (extensions/codex/src/session-catalog-terminal.ts:192, 1b90029dbd75)
  • Latest release check: The shared lookup file is absent from the supplied latest release, v2026.9.2. This is not an implemented-on-main or shipped-fix closure. (extensions/codex/src/session-catalog-node-lookup.ts, 3928bad9badf)
  • Affirmative Codex dependency signal: The catalog control sends native Codex listing requests with archived:false, cursor and limit, then converts response.data into catalog records. The PR also explicitly claims inspection of that upstream listing contract, making direct dependency inspection applicable. (extensions/codex/src/session-catalog-control.ts:268, 26654e69d624)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 5260a2f into main Sep 7, 2026
167 checks passed
@steipete
steipete deleted the codex/refactor-node-catalog-lookup-01a0750a branch September 7, 2026 13:50
@steipete

steipete commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: codex maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant