Skip to content

Upgrade shared Codex to 0.164 and add OpenShell quickstarts - #4160

Open
kevinlin-openai wants to merge 38 commits into
mainfrom
codex/docs-openshell-git-push
Open

kevinlin-openai wants to merge 38 commits into
mainfrom
codex/docs-openshell-git-push

Conversation

@kevinlin-openai

@kevinlin-openai kevinlin-openai commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Verification hold: PR head 052016e3a7086ac0571f28ddc3ffbc689ca22ee3; runtime/controller image source cde2de1a5a767e78081ae8c4a09438d382e33794. Matching native images are qualified; the final managed Linear/Git renewal proof remains pending. Do not merge.

Upgrade both bundled Codex entrypoints to stock 0.164.0 and restore experimental plugin/search. Protected startup admits only explicitly selected, credential-free artifact rules frozen on the Agent revision; both paired compilers verify the complete map and protected live policy apply remains unavailable. Preserve the authorization, custody, deadline and identity boundaries.

Codex 0.164 defaults its separate metrics exporter independently of disabled log export. The observed optional metrics request was blocked by default-deny. The current fix passes the supported otel.metrics_exporter="none" override through native login/status, authentication probing and app-server startup; it adds no egress permission. The upstream configuration contract documents this opt-out.

  • Local source checks pass: typecheck, lint, formatting, docs (304 pages/4862 links) and workspace isolation. The actual0.164 CLI config/read regression fails before the fix and passes after it; 12 launcher credential/deadline/backoff checks pass without skips. Earlier artifact, editor, Controller/PostgreSQL and wire/API evidence retains its recorded source and fixture limits.
  • Canonical incremental P0/P1 review of cde2de1 against7815 completed scoped-clean, report produced, one complete invocation/no fallback. Runtime23b and incremental 993 reviews plus separately assessed omitted docs remain historical coverage; unchanged context is not global review coverage.
  • Test-only descendant 052016e updates three stale native-command expectations. The exact failures reproduce locally (67 passed/235 failed before) and all 302 focused cases pass after, with zero skips; lint, formatting and incremental P0/P1 review pass. Failed cde CI and its actual tested merge c7d8755 remain recorded. Current-head CI is complete: 36 successful checks and nine skips, including a successful First Agent Smoke. All changed paths are excluded from both production image contexts/selectors; production and native-smoke inputs remain identical to cde. Image labels stay cde.
  • Fresh native qualification passed all four controller/runtime jobs on native AMD64/ARM64 at runtime source cde2de1: runtime 188/188 per architecture, controller 6/6 per architecture, zero skips. Every exported blob digest/size, config, architecture and source label was verified. The exact new AMD64 native initializer passed 3/3 without skips. Prior four-image 23b qualification remains valid historical evidence and is not relabeled for this source. No image publication is requested.

The latest cde live-proof attempt reached full qualified startup, passed Codex login and a genuine model probe, and observed artifact GETs under the exact rule. No AB metrics denial occurred. A managed Linear chat returned transport/status OK, but no verified tool-result/team fact is established, so it is not counted as Linear proof. The conservative observer then stopped on an exact stale-policy-generation tunnel closure at the already configured model origin, outside its reviewed enrollment-only classification. The original blocked decisions remain retained; no egress permission was added. Actual scoped PostgreSQL state confirms stopped/active-pointer-null, known material revoked/sealed-absent/settled and zero Git uses. All 13 historical attempts, including older unknown/sealed custody, remain retained. Existing-session interpretation and a bounded model-origin observer classification remain under review; the final native Linear/Git/renewal proof and separate read-only restoration remain incomplete.

The matching cde images and reviewed Installation are installed in the owned local verification environment with the Agent stopped. Exact node image bytes, mounted configuration and retained custody were verified. Final live-run scope review is pending. The final managed Linear read, two empty native pushes on one unique branch across natural worker renewal, independent verification and separate supported read-only configuration restoration are still required. Stop/revocation alone does not establish read-only restoration. Earlier 0.163 proof does not establish 0.164 success.

The earlier description and Manual Notes below retain their recorded scope and source revisions.


Upgrade both bundled Codex entrypoints to stock 0.164.0 and restore experimental plugin/search for protected plugin preparation. Remove the temporary downgrade patch and update executable paths, sandbox provenance, tests and documentation. Preserve identity, deadlines, default-deny, custody and continuity guards. Add OpenShell quickstarts and native install diagnostics that suppress raw warning/RPC content.

Normal merges preserve the supplied upgrade commit and newer history. Runtime implementation and qualified images are pinned to 8048312c7a02b06e75d440eac660890d9693002e. Follow-ups through da01157883a2509b4ce3c47962ff032de45c3a81 change the public preflight helper/guide and a test fixture; these files are not copied into the images.

RFC 0023 now has a proposed protected Codex artifact amendment, submitted for human review before Driver implementation. It proposes an explicitly declared, Sandbox-qualified artifact subset frozen on the revision, exact paired-map validation and protected live-apply refusal. Feedback is requested on that carrier and its qualification limits. Git/PAT scope, approval, custody and isolation controls stay unchanged.

Verification:

  • Last implementation-head CI, CodeQL and Observability Demo pass: 34 successful checks, eight expected skips. The repaired conformance lane passes 3,505/3,505 with zero skips on tested merge 20f6dcf; its plugin-compute file passes 152/152. The earlier failed run remains recorded: one positive fake-WebSocket case exhausted its 25 ms wall-clock fixture budget. The test-only repair counts fixture timer waits, preserving its budget, assertions and expiry cases. Production deadlines are unchanged.
  • Local typecheck, lint, formatting, docs/build/word limits, workspace and registration checks pass. Runtime-source validation includes 697 Go, 58 seccomp and three pipe/stock-0.164 checks without skips. The public-helper follow-up passes its documented bodyless worker GET. The older 601/602 local batch is retained; it is not reported as aggregate green.
  • Canonical P0/P1 review is scoped-clean for the supplied implementation and incremental helper/test deltas. The implementation selected 93 paths, with 88 model-covered and five policy-omitted credential-doc paths assessed separately. Separate independent source assessment covers the updated guide/helper/test hashes; four other omitted-doc hashes are unchanged. Optional unchanged custody/service internals remain outside canonical model coverage. Reviewers did not rerun tests; refused invocations remain recorded as incomplete.
  • Native controller/runtime image and sandbox checks pass all four jobs on actual AMD64 and ARM64 runners at 8048312. OCI architecture/source labels, manifest/config and every layer digest, stock shared CLI version, experimental plugin/search, local plugin default-deny activation and sandbox/runtime smoke receipts were verified. Publication was not requested. These fixtures do not establish the final authenticated Linear/Git workflow.
  • Matching qualified AMD64 exports were installed through normal Helm in the owned local cluster. The worker source hashes/images were verified. After an initial quarantined issuance reached its original settlement bound, the worker policy was reviewed and updated to GitHub's published API IPv4 inventory through the existing worker-only TCP 443 rule. Strict-TLS bodyless installation reads passed. The worker kept its UID and zero restarts; normal initialization-hook recreation is recorded separately.
  • A fresh supported 0.164 revision then passed validated token issuance, enrollment, native login, a genuine model probe and authenticated experimental plugin/search. It failed at plugin/install with RPC -32603 and native class remote_bundle_download_request. The changed startup was correctly blocked by the continuity guard. Normal stop cleared the active revision and revoked the new known material, removed sealed bytes and confirmed zero Git uses. No managed Linear read or native Git push occurred. Supervisor logs were automatically removed before the later read, so the failed peer and causal network decision remain unknown. Source review identifies a protected-policy artifact-composition gap; no live cause, host expansion or composition repair is claimed.

The Agent is stopped. Final managed Linear read, two native empty Git pushes on one test branch, natural credential renewal and final cleanup remain pending. Earlier 0.163 results and account installed-state readback do not establish 0.164 success. Historical ambiguous retirement remains unknown with retained sealed custody after its original hard bound; no revocation success is claimed for it.

The 2,497-word plugin flow and 1,708-word enrollment guide each cover one coherent workflow. No length allowance was added; historical flow entries and Manual Notes are preserved. Do not merge.

@kevinlin-openai
kevinlin-openai requested a review from a team as a code owner October 30, 2026 05:28
@clawsweeper

clawsweeper Bot commented Oct 30, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T05:29:48.385033Z e1f0aaa PR opened
ℹ️ 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: e1f0aaa305

ℹ️ 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 +315 to +317
```bash
jq -nr --rawfile token "$GITHUB_TOKEN_FILE" '"Authorization: Bearer "+($token|rtrimstr("\n"))' |
curl --fail --silent --show-error -H @- -X DELETE https://api.github.com/installation/token

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 Guarantee token revocation after failed runs

When any command between set -euo pipefail in step 1 and this cleanup block fails—including deployment, the Git push, or independent verification—the shared shell exits before reaching this DELETE, despite the instruction to revoke the token even after failure. That can leave a repository-scoped Contents-write installation token usable until it expires; register an exit trap immediately after the token becomes available, or wrap the workflow so revocation always runs.

AGENTS.md reference: AGENTS.md:L294-L296

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added the clawsweeper:intake:docs Preliminary submission classification; full source review pending. label Oct 30, 2026
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Adds an operator walkthrough for native Git push from a dedicated OpenShell Agent, with installation, independent verification, credential withdrawal, and read-only reuse.

Example: Push an empty commit to codex/oce-git-push-20261030T052139Z-78137ff896.

  • Before: Operators must assemble the static Git credential, Agent deployment, and verification steps from separate references.
  • After: One guide connects those steps and checks that GitHub reports the expected commit, parent, and unchanged tree.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, source-backed operator documentation with one credential-cleanup defect that should be repaired before merge.
Proof confidence 🌊 off-meta tidepool Not applicable: This documentation-only PR reports a fresh Linux AMD64 installation, native Git push, and Linear read, with an independently inspectable empty commit; it explicitly identifies read-only redeployment and independent host replay as pending.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Docs · Worth it: Yes · Fix scope: Complete
User problem: Operators lack one complete procedure for pushing and independently verifying a Git branch through the existing static OpenShell credential composition.
Reason: The maintainer-authored direction provides a concrete operator workflow and preserves the protected sender's existing refusal; keeping issuance, verification, withdrawal, and reuse together justifies the guide's reported 2,284-word scope.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this PR open: the guide documents a useful supported composition, but failed runs can bypass write-token cleanup.

Priority: P2
Reviewed head: 0ad995c9532a5f353a0319cf90daa3c866f95c4c

Before merge

  • Register write-token cleanup before commands that can exit (P2) - The procedure keeps one Bash shell with set -euo pipefail, but defines and invokes withdraw_write only after deployment, both chat turns, and independent verification. If any earlier command fails—for example, deployment returns failed or the GitHub SHA check disagrees—the shell exits before this block is reached. The instruction to run it after failure does not preserve the exited shell's variables or provide an executable recovery path, leaving the write token and possibly the Agent active until separately reconciled. Define cleanup and register an EXIT trap before the token is first used, handling an Agent that has not yet been created and preserving the original failure status.
  • Resolve security concern: Repository write authority survives an aborted procedure - The installation token permits writes across the selected repository, rather than only the demonstration branch, so skipped withdrawal retains authority beyond the intended exercise.

Findings

  • [P2] Register write-token cleanup before commands that can exit — docs/guides/repository-credentials/openshell-git-push.md:319-322
  • [medium] Repository write authority survives an aborted procedure — docs/guides/repository-credentials/openshell-git-push.md:319
Agent review details

How this fits together

OCC authorizes and deploys the Agent; native Git sends a credential placeholder through the OpenShell supervisor, which substitutes the repository-scoped token before contacting GitHub.

flowchart LR
  Operator --> OCCAPI
  OCCAPI --> Worker
  Worker --> OpenShellAgent
  OpenShellAgent --> Supervisor
  Supervisor --> GitHub
  Operator --> GitHub
Loading

Technical review

Best possible solution:

Keep the walkthrough and register failure-safe token revocation before the first credential-bearing operation, stopping the Agent when its identity is available.

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

Source shows that a nonzero deployment, chat, or verification command exits the shared errexit-enabled shell before withdrawal is defined; no target code or tests were run.

Is this the best way to solve the issue?

The guide appropriately reuses the existing static source and deployment owners; moving cleanup registration ahead of credential use is the smallest complete repair.

Full review comments:

  • [P2] Register write-token cleanup before commands that can exit — docs/guides/repository-credentials/openshell-git-push.md:319-322
    The procedure keeps one Bash shell with set -euo pipefail, but defines and invokes withdraw_write only after deployment, both chat turns, and independent verification. If any earlier command fails—for example, deployment returns failed or the GitHub SHA check disagrees—the shell exits before this block is reached. The instruction to run it after failure does not preserve the exited shell's variables or provide an executable recovery path, leaving the write token and possibly the Agent active until separately reconciled. Define cleanup and register an EXIT trap before the token is first used, handling an Agent that has not yet been created and preserving the original failure status.
    Confidence: 0.98
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4a27fe5e2ff5.

Provenance checked

Security

Needs attention: Failure cleanup can leave the repository-scoped write credential usable after the exercise aborts.

Evidence

Security concerns:

  • [medium] Repository write authority survives an aborted procedure — docs/guides/repository-credentials/openshell-git-push.md:319
    The installation token permits writes across the selected repository, rather than only the demonstration branch, so skipped withdrawal retains authority beyond the intended exercise.
    Confidence: 0.98

What I checked:

Labels

Label changes:

  • add P2: The operator procedure can leave a short-lived repository write credential active after a failed run.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The operator procedure can leave a short-lived repository write credential active after a failed run.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 30, 2026, 2:17 AM ET / 06:17 UTC.

@freeqaz

freeqaz commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Free's clanker here. ⭐ CI diagnosis on b1d2b66: static fails because docs/guides/deploy/production-installation.md is 2504 words against the enforced 2500-word cap. Please trim with margin and validate using the repository counter (including code blocks). Smoke passed; no rerun of the unchanged static input needed. Receipt: https://github.com/openclaw/openclaw-enterprise/actions/runs/41088207525/job/124174861804

@kevinlin-openai kevinlin-openai changed the title Document end-to-end native Git push from an OpenShell Agent Add local OpenShell quickstarts and safe issuer diagnostics Oct 31, 2026
@kevinlin-openai kevinlin-openai changed the title Add local OpenShell quickstarts and safe issuer diagnostics Add local OpenShell quickstarts and safe runtime diagnostics Oct 31, 2026
@kevinlin-openai kevinlin-openai changed the title Add local OpenShell quickstarts and safe runtime diagnostics Fix protected Codex startup and add local OpenShell quickstarts Oct 31, 2026
@kevinlin-openai kevinlin-openai changed the title Fix protected Codex startup and add local OpenShell quickstarts Upgrade shared Codex to 0.164 and add OpenShell quickstarts Oct 31, 2026
@freeqaz

freeqaz commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Free's clanker here (an AI agent working on Free's behalf).

CI diagnosis for the Checks and Conformance 1 failure on 21c725c (run 41181996034): plugin-compute "installs a plugin with skills and applies write action approval without tool inventory" failed with Codex plugin search deadline expired.

This looks caused by the change rather than a main flake: the file passed on every main push and on the other PR runs in the same window, and on this PR's previous head (8048312); the only change from that head is docs.

Likely cause: the Date.now() >= deadline check in searchCodexSelectionParams (runtime-entrypoints.ts) now runs after every plugin/search response, including a matching one. The success-path tests in tests/conformance/plugin-compute.test.mjs (around line 390) set a 25 ms install deadline on the real clock, so on a loaded runner they can cross it before the match is returned.

Possible fixes: put those success-path tests on the fake clock the PR already adds for the rejection cases, or give tests that don't exercise expiry a larger deadline. (Board finding 3034.)

This branch has not been deployed

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

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants