Skip to content

fix(release): musl adapter stderr hygiene (dev twin) - #2679

Merged
automagik-genie merged 8 commits into
devfrom
fix/musl-adapter-stderr
Jul 26, 2026
Merged

automagik-genie merged 8 commits into
devfrom
fix/musl-adapter-stderr

Conversation

@automagik-genie

Copy link
Copy Markdown
Contributor

Twin of the main-first PR from the same branch — see that PR for full rationale. Merging this after main lands fires the release.

namastex888 and others added 3 commits July 26, 2026 16:30
fix(release): make the Codex dogfood runners able to execute the real harness
The dogfood capability probe fails on any stderr byte. Two bootstrap
sources inside the adapter violated that before the candidate ever ran:

- docker run --pull=always re-resolves the digest-pinned manifest on
  EVERY invocation and writes pull progress to stderr — the workflow's
  pre-pull could never help. The pin is a digest, so pull-if-missing
  already guarantees exact bytes; drop the flag.
- apk add fetches the package index over the network and can emit
  warnings to stderr; only the candidate binary's stderr is meaningful
  to the probe, so silence the bootstrap entirely (set -e still aborts
  on real apk failure).

Run 30217058060: glibc, linux-arm64, and darwin dogfood all passed with
the runner-env fixes; musl was the sole survivor, failing on exactly the
pull-progress stderr.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 44e6613a-22bd-450a-a6bf-4bfe095501e0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/musl-adapter-stderr

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.

@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: 59b228a1a1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

# exact bytes; `--pull=always` would re-resolve the manifest on EVERY run and
# write pull progress to stderr, which the harness's stderr-strict capability
# probe treats as failure. The dogfood workflow pre-pulls the digest.
docker_args=(run --rm -i --security-opt no-new-privileges)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pre-pull the image before the stderr-strict probe

On a clean GitHub-hosted runner where this digest is not cached, Docker's default pull-if-missing behavior still emits pull progress while this first adapter invocation is being captured. The codex-native-dogfood job in .github/workflows/release-publish.yml does not contain the pre-pull claimed by the comment—it resolves the adapter and immediately runs the harness—and verifyCapability rejects any stderr byte, so the musl release check still fails on a fresh runner. Pre-pull the digest in a workflow step outside the captured probe, or otherwise separate Docker bootstrap output from candidate stderr.

AGENTS.md reference: AGENTS.md:L43-L45

Useful? React with 👍 / 👎.

…e open

Review finding on the additive-lag self-heal: between closing the
validated readonly handle and openDb's writable open, nothing pinned the
path's identity — a racing substitution could route ensureSchema's DDL
into a swapped file or symlink target, detected only after the write by
the hardened reopen. Revalidate the exact ProjectDatabaseBinding at the
last moment before the write open; the post-heal reopen still re-verifies
binding and opened handle before any tool observes a healed database.

Regression test pins the class: a binding whose database was substituted
after capture is refused (null) and the substituted file is left
untouched by any write-path open.
…filesystems

The rm-and-recreate substitution let ext4 recycle the freed inode for
the replacement file, so the binding identity legitimately matched again
and the heal proceeded — the test passed on APFS (which never reuses
inode numbers immediately) and failed on Linux CI. Create the substitute
while the original still exists (guaranteed distinct inode), then rename
it over the original: the realistic atomic-swap shape, deterministic on
every filesystem.
@automagik-genie
automagik-genie merged commit b88a4db into dev Jul 26, 2026
28 checks passed
@automagik-genie
automagik-genie deleted the fix/musl-adapter-stderr branch September 25, 2026 04:50
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.

2 participants