Skip to content

docs: explain Codex bwrap AppArmor requirement - #963

Closed
Freudator86 wants to merge 1 commit into
kunchenguid:mainfrom
Coditan:fm/fm-bwrap-apparmor-upstream-doc
Closed

Freudator86 wants to merge 1 commit into
kunchenguid:mainfrom
Coditan:fm/fm-bwrap-apparmor-upstream-doc

Conversation

@Freudator86

Copy link
Copy Markdown
Contributor

Summary

  • document the Ubuntu AppArmor user-namespace restriction that can make Codex apply_patch fail under workspace-write
  • show a path-scoped profile for Codex's bundled bwrap and the in-worktree shell-write stopgap

Validation

  • git diff --check
  • docs-only change

@Freudator86
Freudator86 force-pushed the fm/fm-bwrap-apparmor-upstream-doc branch from ee54656 to 492610b Compare July 26, 2026 23:42
@Freudator86

Copy link
Copy Markdown
Contributor Author

Closing this ourselves. The problem it documents is real, but the content is harmful as written and
the PR cannot honestly be made mergeable, so it will be re-raised through the pipeline with rewritten
content rather than patched here.

Why the content should not land as written

  1. The exact attachment path stops matching after any upgrade, silently. The profile names one
    version-stamped path. When Codex updates, the profile no longer attaches, and nothing reports
    that — the failure returns looking like a new problem.
  2. It covers one install family; three exist. On the host this was written from, bwrap ships
    under a standalone release directory, an npm prefix, and an nvm node version. The single-path
    advice is wrong for two of the three.
  3. No behavioural verification step. apparmor_parser -r exiting 0 proves the profile parsed,
    not that it attached. The absence of a "re-run the previously failing operation and confirm it
    now succeeds" step is exactly what allowed an earlier incident to read as fixed for four days.
  4. The shell-write stopgap weakens normal edit discipline and should not be recommended without
    re-testing whether it is still needed at all.

Why it cannot be fixed in place

The required PR must be raised via no-mistakes check has failed since the opened event and again
on synchronize. The enforcement is a literal search for a pipeline marker in the PR body; a branch
re-push does not rewrite the body, and pasting the marker by hand would forge provenance for a
pipeline run that never happened. The same diagnosis closed an earlier PR by the same author.

What the replacement will contain: globbed stanzas for all three install families with every
varying segment globbed including the home directory, a discovery command for the real
codex-resources/bwrap paths, the sysctl left enabled, and a mandatory behavioural check in a fresh
workspace-write sandbox.

Thanks for the queue triage reminders — the fault here is ours, not the review backlog's.

@Freudator86 Freudator86 closed this Aug 2, 2026
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