Skip to content

feat: expose running image build metadata - #15

Merged
eXPerience83 merged 62 commits into
mainfrom
agent/show-image-build-metadata
Jul 26, 2026
Merged

feat: expose running image build metadata#15
eXPerience83 merged 62 commits into
mainfrom
agent/show-image-build-metadata

Conversation

@eXPerience83

@eXPerience83 eXPerience83 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

What changed

  • Embed the image channel/version and full source revision into the Codex image at build time.
  • Add remote-dev-version for querying the embedded image metadata without Docker socket access.
  • Show the image channel, abbreviated source revision and installed Codex CLI version in the web menu and diagnostics.
  • Mark modified local worktrees with -dirty and source trees without their own Git worktree as local-untracked.
  • Reject empty, multiline or reserved local build identity values before invoking Docker.
  • Bind displayed image identity to the files embedded during the build; runtime environment variables cannot replace it.
  • Clear the previous menu before opening Codex, resume, authentication, diagnostics or a login shell.
  • Keep the tmux window name fixed as remote-dev for new and existing sessions.
  • Make initial tmux session creation safe when multiple clients connect concurrently.
  • Require stable release tags to point to a commit in main history.
  • Correct the English and Spanish documentation for automatic edge publication and image identity inspection.

Why

TrueNAS validation confirmed that the current edge image contains Codex CLI 0.145.0, Bubblewrap 0.11.1, working Codex/GitHub authentication and hardened credential permissions. However, the terminal did not expose the exact image revision, making it difficult to prove which moving edge-amd64 build was under test.

Browser testing also found that the startup menu remained visible above the Codex TUI and tmux automatically changed the status-line name between foreground programs and scrollback mode. This PR presents each interactive screen cleanly and keeps a stable tmux window name without disabling mouse scrollback.

Impact

  • Users can verify the exact image channel, source revision and installed Codex CLI version before running tests.
  • Interactive screens open cleanly, while browser reconnects keep using the persistent tmux session.
  • Existing workspace, Codex, GitHub CLI, Git and SSH persistent data layouts are unchanged; no data migration is required.
  • The running TrueNAS app remains on its current image until the operator deliberately pulls/recreates it after merge.
  • Stable publication becomes stricter: an exact semantic-version tag must also point to a commit contained in main history.

Safety and release

  • No container privileges, capabilities, host mounts, networking mode or Bubblewrap policy are weakened.
  • Web authentication requirements and credential-permission hardening remain unchanged.
  • Image identity is read from build-embedded, read-only files and cannot be replaced through normal runtime environment variables.
  • Local, edge and stable build paths validate metadata and source-revision behavior before image publication.
  • This PR does not create a stable release. The resulting image remains in the experimental edge channel until it is recreated and retested on TrueNAS.
  • Rollback remains available by deploying a previously recorded immutable image digest.

Expected menu

Codex Remote Dev
Image: edge @ <12-character-revision>
Codex: codex-cli <version>
================

A modified local worktree is reported as <12-character-revision>-dirty. A copied or unpacked source tree without its own Git worktree is reported as local-untracked.

Expected diagnostic command

Image version: edge
Source revision: <full-commit-sha>
Codex CLI: codex-cli <version>

Independent audit findings addressed

In addition to external review comments, a manual audit of all changed files and adjacent runtime/release code found and corrected:

  • runtime environment overrides that could falsify the displayed image identity;
  • missing exact assertions for the Codex CLI version shown by remote-dev-version;
  • a sequential tmux test that did not actually prove concurrent first connections;
  • Git status failures that could otherwise misidentify a worktree as clean;
  • publication workflows that did not run the source-revision test suite;
  • stable semantic-version tags that could previously point outside main history.

Validation

  • Shell syntax and repository configuration validation pass.
  • Build AMD64 #105 completes successfully on the current head.
  • Exact image version, source revision and Codex CLI output are asserted.
  • Runtime environment variables cannot replace the displayed embedded identity.
  • Source revision detection covers plain directories, enclosing foreign worktrees, clean repositories, tracked modifications, untracked files and Git status failures.
  • Fresh, existing and genuinely concurrent tmux session paths pass runtime smoke tests.
  • All inline review conversations are resolved.
  • Published edge image retested on TrueNAS after merge.

Scope and residual follow-up

This PR does not alter container privileges, the TrueNAS Compose security profile or Bubblewrap behavior. The observed Nested bubblewrap sandbox: UNAVAILABLE result remains a host namespace/AppArmor limitation; no privileged mode, SYS_ADMIN or unconfined profile is added.

The following repository-wide hardening items are intentionally deferred to dedicated follow-up work rather than expanding this PR further:

  • pin GitHub Actions to immutable commit SHAs instead of major-version tags;
  • make base and child image publication transactional or otherwise prevent partial moving-tag updates;
  • add dedicated actionlint/ShellCheck CI and positive authenticated ttyd automation;
  • define stronger stable-release governance such as an approval environment or signed-tag policy.

Codex CLI 0.145.0 does not provide a first-class safe session-delete command. This PR therefore does not delete rollout JSONL files or edit Codex indexes/SQLite state outside the official CLI.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The change embeds image channel and source revision metadata in Codex images, adds a remote-dev-version reporting command, integrates metadata into menus and diagnostics, updates smoke tests and documentation, and stabilizes tmux window naming and terminal behavior.

Changes

Embedded image metadata and remote-dev reporting

Layer / File(s) Summary
Embed image metadata
scripts/detect-source-revision.sh, scripts/build-local.sh, scripts/test-source-revision.sh, .github/workflows/*, images/codex/Dockerfile
Builds derive and pass project/source revisions into the image, which stores them in OCI labels and read-only metadata files; source-revision detection is tested and included in repository validation.
Report and validate metadata
scripts/lib/format-short-revision.sh, scripts/remote-dev-version.sh, scripts/codex-doctor.sh, scripts/smoke-test.sh, README*, CHANGELOG.md
The new command reports image and Codex metadata; diagnostics and smoke tests validate it, while documentation and the changelog describe the exposed metadata.
Stabilize terminal interaction
scripts/codex-menu.sh, scripts/start-codex-web.sh, scripts/attach-remote-dev-tmux.sh, config/tmux.conf
Interactive actions clear the terminal and report failures, web startup delegates tmux setup to a shared attach script, and automatic tmux renaming is disabled.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant BuildWorkflow
  participant CodexDockerfile
  participant RemoteDevVersion
  participant CodexMenu
  participant CodexDoctor

  BuildWorkflow->>CodexDockerfile: pass PROJECT_VERSION and SOURCE_REVISION
  CodexDockerfile->>CodexDockerfile: write OCI label and metadata files
  CodexMenu->>RemoteDevVersion: request --menu summary
  RemoteDevVersion-->>CodexMenu: return image revision and Codex version
  CodexDoctor->>RemoteDevVersion: validate embedded metadata
  RemoteDevVersion-->>CodexDoctor: return metadata status
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately summarizes the main change: exposing image build metadata.
Description check ✅ Passed The description covers what changed, impact, validation, safety, and follow-up with mostly complete detail.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/show-image-build-metadata

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@eXPerience83

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/codex-doctor.sh`:
- Around line 32-35: Update the remote-dev-version validation block to reject
successful command output that reports unknown, missing, or unreadable metadata,
not just nonzero command exits. Validate both metadata values/files explicitly
or invoke the command’s validation mode so invalid metadata sets status=1, while
preserving the existing unavailable message for command failures.

In `@scripts/codex-menu.sh`:
- Around line 6-10: Update run_interactive_and_harden to capture each wrapped
command’s exit status, print a concise failure message, and preserve that status
instead of using “|| true”; add explicit status checks and user-facing errors
for gh auth login and gh auth setup-git in the authentication/setup flow,
ensuring failures do not proceed silently to persistence or the menu.

In `@scripts/smoke-test.sh`:
- Around line 18-21: Strengthen the smoke-test metadata checks around
/usr/share/remote-dev/image-version and /usr/share/remote-dev/source-revision:
read and validate their exact expected build-input values, rejecting empty or
unknown values, then assert those exact values appear in both remote-dev-version
outputs, including the menu output. Replace bare test commands with production
Bash checks that emit useful failure messages while preserving the existing
default and --menu verification.

In `@scripts/start-codex-web.sh`:
- Around line 63-69: Update the tmux session setup for the codex and shell cases
so the attached existing session’s active window is explicitly renamed to
remote-dev, not only newly created via -n. Add a preflight rename-window step
while preserving the current new-session behavior, and cover both new-session
and existing-session paths in tests.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 85a4cfc9-192b-4e57-976c-177f5cb70e80

📥 Commits

Reviewing files that changed from the base of the PR and between 1d24ad3 and a5ae5ec.

📒 Files selected for processing (13)
  • .github/workflows/publish-amd64.yml
  • .github/workflows/publish-edge-amd64.yml
  • CHANGELOG.md
  • README.es.md
  • README.md
  • config/tmux.conf
  • images/codex/Dockerfile
  • scripts/build-local.sh
  • scripts/codex-doctor.sh
  • scripts/codex-menu.sh
  • scripts/remote-dev-version.sh
  • scripts/smoke-test.sh
  • scripts/start-codex-web.sh
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
scripts/**/*.sh

⚙️ CodeRabbit configuration file

scripts/**/*.sh: Review as production Bash. Check quoting, set -euo pipefail behavior, cleanup traps,
bounded retries and timeouts, non-interactive execution, idempotency and useful failure messages.
Flag commands that can hang, leak credentials, silently ignore failures or mutate persistent data unexpectedly.

Files:

  • scripts/start-codex-web.sh
  • scripts/build-local.sh
  • scripts/smoke-test.sh
  • scripts/codex-doctor.sh
  • scripts/remote-dev-version.sh
  • scripts/codex-menu.sh
.github/workflows/**

⚙️ CodeRabbit configuration file

.github/workflows/**: Review GitHub Actions for least-privilege permissions, safe event triggers, untrusted input handling,
accidental publication, tag-channel correctness, secret exposure, reproducible builds, SBOM/provenance
generation and appropriate validation before pushing images.

Files:

  • .github/workflows/publish-edge-amd64.yml
  • .github/workflows/publish-amd64.yml
**/*.md

⚙️ CodeRabbit configuration file

**/*.md: Check that documentation matches the implemented behavior and clearly distinguishes experimental edge builds
from stable releases. Flag outdated versions, unsafe deployment guidance and claims not proven by CI or testing.

Files:

  • CHANGELOG.md
  • README.md
  • README.es.md
images/**/Dockerfile

⚙️ CodeRabbit configuration file

images/**/Dockerfile: Review for reproducibility, supply-chain security and minimal image growth.
Require pinned upstream versions and checksum or digest verification for downloaded binaries.
Flag secrets, floating base tags, unsafe remote-script execution, broken multi-architecture logic,
cache misuse, unnecessary packages and changes that weaken the secure-by-default runtime.

Files:

  • images/codex/Dockerfile
🔇 Additional comments (9)
scripts/build-local.sh (1)

13-14: LGTM!

Also applies to: 33-34

.github/workflows/publish-amd64.yml (1)

102-102: LGTM!

.github/workflows/publish-edge-amd64.yml (1)

108-112: LGTM!

images/codex/Dockerfile (1)

8-13: LGTM!

Also applies to: 55-55, 64-72

README.es.md (1)

25-25: LGTM!

Also applies to: 49-62

config/tmux.conf (1)

6-9: LGTM!

scripts/remote-dev-version.sh (1)

1-41: LGTM!

CHANGELOG.md (1)

26-26: LGTM!

README.md (1)

49-49: LGTM!

Also applies to: 75-87

Comment thread scripts/codex-doctor.sh Outdated
Comment thread scripts/codex-menu.sh
Comment thread scripts/smoke-test.sh Outdated
Comment thread scripts/start-codex-web.sh Outdated

@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: 154f9f0b08

ℹ️ 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/attach-remote-dev-tmux.sh Outdated

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/codex-menu.sh`:
- Around line 63-68: Move the version-summary computation using
remote-dev-version out of the repeatedly executing while loop in
scripts/codex-menu.sh, initializing version_summary once before the loop.
Preserve the existing fallback to “Image metadata unavailable” when the check
fails, and only refresh the cached value if the menu explicitly needs to detect
a runtime Codex CLI upgrade.

In `@scripts/smoke-test.sh`:
- Around line 31-39: Remove the duplicated format_short_revision implementation
from smoke-test.sh and introduce a shared helper, such as
scripts/lib/format-short-revision.sh, containing the canonical function. Source
that helper from both smoke-test.sh and remote-dev-version.sh, preserving the
existing formatting behavior and exact-value assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 55430f2b-99c9-4bf5-a852-45255ce54915

📥 Commits

Reviewing files that changed from the base of the PR and between 1d24ad3 and 194b649.

📒 Files selected for processing (17)
  • .github/workflows/build-amd64.yml
  • .github/workflows/publish-amd64.yml
  • .github/workflows/publish-edge-amd64.yml
  • CHANGELOG.md
  • README.es.md
  • README.md
  • config/tmux.conf
  • images/codex/Dockerfile
  • scripts/attach-remote-dev-tmux.sh
  • scripts/build-local.sh
  • scripts/codex-doctor.sh
  • scripts/codex-menu.sh
  • scripts/detect-source-revision.sh
  • scripts/remote-dev-version.sh
  • scripts/smoke-test.sh
  • scripts/start-codex-web.sh
  • scripts/test-source-revision.sh
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
.github/workflows/**

⚙️ CodeRabbit configuration file

.github/workflows/**: Review GitHub Actions for least-privilege permissions, safe event triggers, untrusted input handling,
accidental publication, tag-channel correctness, secret exposure, reproducible builds, SBOM/provenance
generation and appropriate validation before pushing images.

Files:

  • .github/workflows/build-amd64.yml
  • .github/workflows/publish-amd64.yml
  • .github/workflows/publish-edge-amd64.yml
scripts/**/*.sh

⚙️ CodeRabbit configuration file

scripts/**/*.sh: Review as production Bash. Check quoting, set -euo pipefail behavior, cleanup traps,
bounded retries and timeouts, non-interactive execution, idempotency and useful failure messages.
Flag commands that can hang, leak credentials, silently ignore failures or mutate persistent data unexpectedly.

Files:

  • scripts/start-codex-web.sh
  • scripts/test-source-revision.sh
  • scripts/attach-remote-dev-tmux.sh
  • scripts/detect-source-revision.sh
  • scripts/build-local.sh
  • scripts/smoke-test.sh
  • scripts/codex-doctor.sh
  • scripts/remote-dev-version.sh
  • scripts/codex-menu.sh
**/*.md

⚙️ CodeRabbit configuration file

**/*.md: Check that documentation matches the implemented behavior and clearly distinguishes experimental edge builds
from stable releases. Flag outdated versions, unsafe deployment guidance and claims not proven by CI or testing.

Files:

  • CHANGELOG.md
  • README.md
  • README.es.md
images/**/Dockerfile

⚙️ CodeRabbit configuration file

images/**/Dockerfile: Review for reproducibility, supply-chain security and minimal image growth.
Require pinned upstream versions and checksum or digest verification for downloaded binaries.
Flag secrets, floating base tags, unsafe remote-script execution, broken multi-architecture logic,
cache misuse, unnecessary packages and changes that weaken the secure-by-default runtime.

Files:

  • images/codex/Dockerfile
🔇 Additional comments (17)
scripts/detect-source-revision.sh (1)

1-41: LGTM!

scripts/test-source-revision.sh (1)

1-42: LGTM!

scripts/build-local.sh (1)

4-4: LGTM!

Also applies to: 13-17, 36-37

.github/workflows/publish-amd64.yml (1)

102-102: LGTM!

.github/workflows/publish-edge-amd64.yml (1)

111-112: LGTM!

images/codex/Dockerfile (1)

8-13: LGTM!

Also applies to: 53-82

scripts/start-codex-web.sh (1)

62-63: LGTM!

scripts/attach-remote-dev-tmux.sh (1)

1-56: LGTM!

config/tmux.conf (1)

6-9: LGTM!

.github/workflows/build-amd64.yml (1)

28-28: LGTM!

scripts/remote-dev-version.sh (1)

1-78: LGTM!

scripts/codex-doctor.sh (1)

27-38: LGTM! The --check branch now relies on remote-dev-version --check's real content validation (unknown/unavailable metadata is rejected), which resolves the previously flagged gap where success could mask missing metadata.

scripts/smoke-test.sh (1)

4-8: LGTM! The exact-value metadata assertions (lines 47-76), the semantic-marker edge case (lines 78-86), and the per-run tmux socket isolation (lines 23-29, 104-141) resolve the previously flagged gap where arbitrary/unknown metadata could pass.

Also applies to: 23-29, 41-91, 104-141

CHANGELOG.md (1)

26-26: LGTM! Correctly distinguishes embedded image metadata from the runtime-reported Codex CLI version, resolving the earlier wording concern.

README.md (1)

49-49: LGTM! Wording now correctly distinguishes embedded image metadata from the runtime Codex CLI version, and the "Expected edge output" example matches remote-dev-version's actual output format.

Also applies to: 75-88

README.es.md (1)

25-25: LGTM! Consistent with the README.md wording and resolves the same past embedded-vs-runtime distinction concern.

Also applies to: 49-62

scripts/codex-menu.sh (1)

6-61: LGTM! The refactored failure handling correctly captures and reports exit status for interactive commands and the GitHub login/setup flow, resolving the previously flagged silent-failure issues.

Also applies to: 86-108

Comment thread scripts/codex-menu.sh Outdated
Comment thread scripts/smoke-test.sh Outdated
@eXPerience83

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/build-local.sh`:
- Around line 15-17: Update the SOURCE_REVISION guard in the build script to
treat both an unset variable and an explicitly empty value as missing, then run
detect-source-revision.sh before invoking Docker. Preserve any non-empty
caller-provided revision, and apply the same empty-value validation to default
values such as PROJECT_VERSION if they are used in the Docker build inputs.

In `@scripts/test-source-revision.sh`:
- Around line 39-40: Extend the dirty-worktree test around the tracked.txt
modification to restore tracked.txt, create an untracked file in the same
worktree, and assert that invoking the helper still returns
${head_revision}-dirty. Use the existing cleanup and assertion flow so the
untracked-file case specifically exercises status --porcelain
--untracked-files=normal.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b52205d8-40c8-47ea-b01f-40ee25a0355e

📥 Commits

Reviewing files that changed from the base of the PR and between 1d24ad3 and 7c4ab89.

📒 Files selected for processing (18)
  • .github/workflows/build-amd64.yml
  • .github/workflows/publish-amd64.yml
  • .github/workflows/publish-edge-amd64.yml
  • CHANGELOG.md
  • README.es.md
  • README.md
  • config/tmux.conf
  • images/codex/Dockerfile
  • scripts/attach-remote-dev-tmux.sh
  • scripts/build-local.sh
  • scripts/codex-doctor.sh
  • scripts/codex-menu.sh
  • scripts/detect-source-revision.sh
  • scripts/lib/format-short-revision.sh
  • scripts/remote-dev-version.sh
  • scripts/smoke-test.sh
  • scripts/start-codex-web.sh
  • scripts/test-source-revision.sh
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.md

⚙️ CodeRabbit configuration file

**/*.md: Check that documentation matches the implemented behavior and clearly distinguishes experimental edge builds
from stable releases. Flag outdated versions, unsafe deployment guidance and claims not proven by CI or testing.

Files:

  • CHANGELOG.md
  • README.es.md
  • README.md
.github/workflows/**

⚙️ CodeRabbit configuration file

.github/workflows/**: Review GitHub Actions for least-privilege permissions, safe event triggers, untrusted input handling,
accidental publication, tag-channel correctness, secret exposure, reproducible builds, SBOM/provenance
generation and appropriate validation before pushing images.

Files:

  • .github/workflows/publish-amd64.yml
  • .github/workflows/build-amd64.yml
  • .github/workflows/publish-edge-amd64.yml
scripts/**/*.sh

⚙️ CodeRabbit configuration file

scripts/**/*.sh: Review as production Bash. Check quoting, set -euo pipefail behavior, cleanup traps,
bounded retries and timeouts, non-interactive execution, idempotency and useful failure messages.
Flag commands that can hang, leak credentials, silently ignore failures or mutate persistent data unexpectedly.

Files:

  • scripts/test-source-revision.sh
  • scripts/start-codex-web.sh
  • scripts/lib/format-short-revision.sh
  • scripts/attach-remote-dev-tmux.sh
  • scripts/build-local.sh
  • scripts/remote-dev-version.sh
  • scripts/codex-doctor.sh
  • scripts/smoke-test.sh
  • scripts/detect-source-revision.sh
  • scripts/codex-menu.sh
images/**/Dockerfile

⚙️ CodeRabbit configuration file

images/**/Dockerfile: Review for reproducibility, supply-chain security and minimal image growth.
Require pinned upstream versions and checksum or digest verification for downloaded binaries.
Flag secrets, floating base tags, unsafe remote-script execution, broken multi-architecture logic,
cache misuse, unnecessary packages and changes that weaken the secure-by-default runtime.

Files:

  • images/codex/Dockerfile
🔇 Additional comments (17)
scripts/detect-source-revision.sh (1)

1-41: LGTM!

.github/workflows/build-amd64.yml (1)

26-30: LGTM!

.github/workflows/publish-amd64.yml (1)

35-37: LGTM!

Also applies to: 104-104

.github/workflows/publish-edge-amd64.yml (1)

44-46: LGTM!

Also applies to: 113-114

images/codex/Dockerfile (1)

8-13: LGTM!

Also applies to: 53-84

scripts/lib/format-short-revision.sh (1)

1-11: LGTM!

scripts/remote-dev-version.sh (1)

1-72: LGTM!

scripts/codex-doctor.sh (1)

27-38: LGTM!

scripts/smoke-test.sh (1)

4-8: LGTM!

Also applies to: 23-104, 123-154

scripts/build-local.sh (1)

4-4: LGTM!

Also applies to: 13-13, 36-37

CHANGELOG.md (1)

26-26: LGTM!

README.md (1)

49-49: LGTM!

Also applies to: 75-87

README.es.md (1)

25-25: LGTM!

Also applies to: 49-62

scripts/codex-menu.sh (1)

6-67: LGTM!

Also applies to: 86-108

scripts/start-codex-web.sh (1)

62-63: LGTM!

scripts/attach-remote-dev-tmux.sh (1)

1-56: LGTM!

config/tmux.conf (1)

7-9: LGTM!

Comment thread scripts/build-local.sh Outdated
Comment thread scripts/test-source-revision.sh Outdated

Copy link
Copy Markdown
Owner Author

Independent pre-merge audit

A manual audit was completed across all 19 changed files plus adjacent runtime, release and security code. This was not limited to existing CodeRabbit/Codex findings.

Additional issues found and fixed independently

  • Prevented runtime environment variables from replacing the image version/source revision shown to users.
  • Added exact assertions for the installed Codex CLI version in both full and menu output.
  • Replaced the previous sequential claim with a real simultaneous two-client tmux creation test.
  • Made source-revision detection fail safely when git status cannot inspect the worktree.
  • Added dirty-worktree coverage for untracked files and invalid Git index/status handling.
  • Added source-revision tests to both edge and stable publication validation.
  • Rejected empty, multiline and reserved local build identity values before the Docker build starts.
  • Required stable release tags to point to commits in main history before updating stable or latest.

Validation completed

  • Build AMD64 #105: success on head 6348c338ed34d7082280be4038cc6c0f0b2bb214.
  • Repository configuration and Bash syntax validation: success.
  • Image build and runtime smoke tests: success.
  • New/existing/concurrent tmux paths: success.
  • Embedded metadata identity and exact Codex CLI output: success.
  • All inline review conversations: resolved.

Reviewed but not treated as blockers

  • CodeRabbit's generic docstring-coverage warning is not applicable to these production Bash scripts; adding artificial docstrings solely to satisfy that language-agnostic metric would not improve runtime safety.
  • Immutable action-SHA pinning, transactional multi-image publication, dedicated actionlint/ShellCheck CI, positive authenticated-ttyd automation and stronger stable-release governance are worthwhile repository-wide follow-ups, but are deliberately kept out of this already broad PR.

The remaining manual gate is deployment of the published post-merge edge image on TrueNAS and verification of the visible revision, clean screen transitions, stable tmux label and persisted credentials/workspace.

Copy link
Copy Markdown
Owner Author

Follow-up on the current CodeRabbit pre-merge checks

  • Impact / Safety sections: addressed in the PR description with explicit user, operator, security, release-channel and rollback impact.
  • Docstring coverage warning: reviewed and intentionally not treated as actionable. This PR is predominantly production Bash, Dockerfile, workflow and Markdown code; adding artificial comments solely to satisfy a generic 80% docstring metric would not improve correctness or maintainability. Bash behavior is instead covered by syntax validation, focused helper tests, image smoke tests and runtime smoke tests.

No new unresolved inline code findings are present at this point.

@eXPerience83
eXPerience83 merged commit 9606ce6 into main Jul 26, 2026
2 checks passed
@eXPerience83
eXPerience83 deleted the agent/show-image-build-metadata branch July 26, 2026 12:47
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