Skip to content

fix: habilita publicación con política conductual por etapa - #54

Merged
datacas merged 5 commits into
mainfrom
issue-49-publication-access
Sep 23, 2026
Merged

datacas merged 5 commits into
mainfrom
issue-49-publication-access

Conversation

@datacas

@datacas datacas commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Resumen

Permite que los stages publicadores de un ciclo real publiquen en GitHub y declara en el contrato de rol qué puede publicar cada stage. La frontera de publicación es conductual: los agentes conservan su acceso normal a gh, git y la red de GitHub, y el prompt de cada stage indica qué operaciones puede hacer.

Cambios

  • RoleContract declara publicación y operaciones por rol: implement (comment, create_pr, push_branch), resolve (comment, push_branch), review/rereview (comment). local-only desactiva la publicación.
  • Cada stage recibe en su prompt la política de publicación y las prohibiciones comunes: nunca merge, force-push ni borrado de refs; no modificar la base branch; no cerrar issues o PRs sin instrucción expresa; no publicar por otro stage.
  • Codex publicador: perfil de permisos con el sandbox de archivos de la etapa y red a GitHub/Bitbucket. Requiere CLI 0.138.0 o posterior.
  • Claude publicador: recibe gh y git.
  • Comprobación de readiness previa al dispatch (gh auth status, viewerPermission, git push --dry-run). Un fallo queda registrado como missing_capability=publication_access. Es una comprobación de disponibilidad, no de permisos por operación.
  • Los adaptadores sin contrato de publicación (Orca incluido) fallan cerrados.
  • README y CHANGELOG actualizados.

Verificación

  • python3 scripts/validate-package.py: correcto.
  • python3 -m unittest discover -s tests -q: 605 pruebas correctas.

Closes #49

@datacas

datacas commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Initial review — PR #54 fix: habilita publicación con permisos mínimos por etapa

Verdict: CHANGES_REQUESTED. Reviewed HEAD: 4c96e3b6fe84395981e0d2538ff1d0e315224450. Base: main; merge-base 0a94152. The branch is BEHIND main by #48 (947f45e), which touches no file of this PR, so there is no conflict.

Summary and scope

I reviewed the whole diff (one commit, 9 files) against #49 and CONTRIBUTING.md. The design is sound:

  • a publishes flag in the role contract, which local-only turns off;
  • adapters fail closed unless they declare a publication contract;
  • a no-change host preflight (gh auth status, viewerPermission, git push --dry-run to an unused ref);
  • blocks recorded as missing_capability=publication_access before any model starts;
  • Codex permission profiles in place of danger-full-access.

However, the Codex arguments this PR builds are rejected by Codex itself. As written, every publishing Codex stage (the default for implement, review, resolve, and rereview) cannot start. The unit tests assert the argument strings, so they pass without the CLI ever parsing them.

Findings

[REV-001] · high · open · blocks:yes — Codex rejects the publish-profile domain overrides; no publishing Codex stage can start

Path: scripts/executors.py (lines 644–647). Category: correctness.

-c 'permissions.<profile>.network.domains."github.com"="allow"' is split on the dot inside the quoted key. Observed with the PR's own CodexAdapter.argv(..., publishes=True) and Codex CLI 0.156.1:

== writes=False exit=1
STDERR:Error loading config.toml: unknown variant `com"`, expected `allow` or `deny` in `permissions`
== writes=True exit=1
STDERR:Error loading config.toml: unknown variant `com"`, expected `allow` or `deny` in `permissions`

It reproduces with an empty CODEX_HOME, so no local configuration is involved. The dispatch fails at config load, so as it stands a real cycle now stops at implement, earlier than before this PR.

A form that works: pass the domains as one inline table, -c 'permissions.<profile>.network.domains={"github.com"="allow","api.github.com"="allow","bitbucket.org"="allow","api.bitbucket.org"="allow"}'. With that single change, a real dispatch in a clone of a test repository gave:

Profile https://api.github.com https://example.com write in workspace write in /tmp
code_cycle_publish_read 200 blocked ("domain is not on the allowlist") refused (read-only FS) refused
code_cycle_publish_write 200 blocked allowed allowed

The /tmp write in the write profile matches today's workspace-write, so it is not a regression. Please also add a test that makes Codex parse the arguments, or at least one that fails on a quoted dotted key. tests/test_executors.py:889 currently asserts the broken string.

[REV-002] · medium · open · blocks:yes — Claude's publication allowlist grants far more than publishing, including merge, and gives read-only reviewers git push

Path: scripts/executors.py (line 729). Category: security.

--allowedTools "Bash(gh:*)" "Bash(git push:*)" is a prefix match. Bash(gh:*) allows any gh subcommand, for example gh pr merge, gh api -X DELETE …, gh release create, gh secret set, and gh issue close. That contradicts the toolkit's "Never merge" rule (CONTRIBUTING.md) and #49's acceptance criterion "no dispatch receives more access than its role needs to publish". It is also applied unchanged to review and rereview: a read-only reviewer receives Bash(git push:*), including --force and ref deletion (git push origin :branch). A reviewer only needs to read the change request and post a comment.

Suggested direction: allowlist per role.

  • Review and rereview: e.g. Bash(gh pr view:*), Bash(gh pr diff:*), Bash(gh pr checks:*), Bash(gh pr comment:*), plus read-only gh api if the skills need it. No git push.
  • Implement and resolve: add Bash(gh pr create:*), Bash(gh pr edit:*), Bash(git push origin:*), with an explicit disallow of --force and of pushing to the base branch if the CLI supports deny rules (--disallowedTools "Bash(gh pr merge:*)" at minimum).

This finding comes from reading the code and from the documented prefix semantics of --allowedTools. I did not execute it, to avoid merging or deleting anything in a real repository.

[REV-003] · low · open · blocks:no — No CHANGELOG.md entry

Path: CHANGELOG.md. Category: maintainability.

Every feature and fix PR in this repository adds an [Unreleased] entry. This one changes executor permissions, adds a telemetry token (publication_access), and raises the minimum Codex version (0.138.0). All three are user-visible.

Security triage

Sensitive change: it grants network and command permissions to agent executors and adds a host-side credential check.

  • Codex (once REV-001 is fixed): network scoping and the filesystem boundary behave as documented (see the REV-001 table).
  • Preflight: it does not change remote state. git push --dry-run targets an unused ref and creates nothing. Its error details carry exit codes, not command output, so no token or remote URL leaks into detail.
  • Claude: the allowlist is too broad (REV-002).
  • Residual risk the network allowlist cannot close: a Codex stage that can reach api.github.com with the user's gh token can call any API that token allows, merge included. Network scoping limits where, not what. It needs to be stated in the README.

Verification executed

Preflight: Python 3.10.12, PyYAML, Codex CLI 0.156.1 authenticated, a detached worktree at 4c96e3b, and a clone of datacas/code-cycle-sandbox.

Command Result
python3 scripts/validate-package.py VALID: 13 skills (6 cycle, 7 supporting)…
python3 -m unittest discover -s tests 599/600. The one failure is test_run_cycle.LocalOnlyPolicyTests.test_local_only_rejects_the_live_repository, the known artefact of running outside the canonical checkout (CI passes it).
codex exec with CodexAdapter.argv(..., publishes=True), read and write profiles Both exit 1 at config load → REV-001
Same, empty CODEX_HOME, single quoted-domain override Same error → not caused by local config
Same, domains as one inline table Loads; network and filesystem as in the REV-001 table

Not verified: I did not run the Claude publication path (REV-002) or _publication_preflight against a real remote. Its logic was reviewed by reading it and is covered by the PR's installed-cycle test with a local Git remote.

CI

gh pr checks 54: 4/4 passed. That is Validate package run twice (push + pull_request), each with Skills, manifests, and Bash installer ✅ and PowerShell installer ✅. None are pending, skipped, or missing. CI does not run Codex, which is why REV-001 passed it.

Residual risks

  • Token breadth, as described in the security triage.
  • viewerPermission requires push access even for reviewers. That is stricter than a comment needs, and acceptable.
  • The behaviour of Codex permission profiles depends on the CLI version beyond the 0.138.0 floor. The syntax in REV-001 is the kind of detail that changes between releases.

Project verdict: CHANGES_REQUESTED. REV-001 and REV-002 block approval; REV-003 does not.

@datacas

datacas commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner Author

Resolve comments — PR #54

Functional status: PARTIALLY_RESOLVED.

Fix commits: e2bed5793e36e821017b2500fa526ca2481f0772 and 4f713cc0d207b1fcdc97c349940374b808bc4324.

[REV-001] · high · resolved · blocks:yes — Codex publish-profile domain overrides fail to parse

Path: scripts/executors.py.

Resolution: Replaced dotted overrides with one TOML inline table for the four allowed GitHub and Bitbucket hosts. Added a regression assertion that rejects quoted dotted keys.

Verification: python3 -m unittest discover -s tests -q — 606 tests passed.

[REV-002] · medium · resolved · blocks:yes — Claude's publication allowlist grants more access than each stage needs

Paths: scripts/cycle.py, scripts/executors.py, README.md.

Resolution: Publication commands now follow the role contract. Implement can create a PR, comment, and push its current branch; resolve can comment and push that branch; review and rereview can only comment. Claude no longer receives general gh or git push prefixes. Unsafe branch names receive no push permission.

Verification: Regression tests cover each role's permissions and reject shell syntax in branch names; the full 606-test suite passed.

[REV-003] · high · resolved · blocks:yes — GitHub write collaborators fail the publication preflight

Path: scripts/executors.py.

Resolution: The preflight now accepts GitHub's viewerPermission: WRITE value, alongside MAINTAIN and ADMIN. Added a mocked regression test for WRITE.

Verification: python3 -m unittest discover -s tests -q — 606 tests passed.

[REV-004] · medium · open · blocks:yes — Codex publication does not enforce the role's allowed operations

Paths: scripts/cycle.py, scripts/executors.py.

The role contract gives Codex review and rereview stages comment-only publication permissions, but Codex's network profile only limits destination hosts. It does not restrict API operations on GitHub or Bitbucket. A review session with ambient credentials can still push, create a PR, or make other writes to those hosts. This needs per-action enforcement or a constrained publisher before the role boundary is complete.

Verification and checks

  • python3 scripts/validate-package.py — passed.
  • python3 -m unittest discover -s tests -q — 606 tests passed.
  • PR checks for current head 4f713cc: all four checks passed (two package/ Bash and two PowerShell runs). An earlier CI run exposed a detached-HEAD assumption in two tests; commit 4f713cc removed that assumption and the rerun passed.
  • Live publication through Codex and Claude was not exercised.

@datacas

datacas commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Re-review — PR #54

Functional status: BLOCKED. Reviewed HEAD: 4f713cc0d207b1fcdc97c349940374b808bc4324 (same as the latest resolution comment). Base/merge-base: main / 0a94152773ecfe1cf95339b1426e64443ba34819. The accumulated diff is 9 files (468 additions, 15 deletions); there are no commits since that reviewed head.

Finding history

The trusted timeline reuses REV-003 for two distinct findings. I have preserved both claims and have not reassigned either ID. This collision prevents an unambiguous recovered review record, so the functional status is BLOCKED.

[REV-001] · high · resolved · blocks:yes — Codex publish-profile domain overrides fail to parse

Path: scripts/executors.py.

Corrected and regression-verified: the current arguments encode the allowed domains as one inline table and no longer use quoted dotted keys. The executor tests (122 tests) and full unit suite pass. This rereview did not run a live Codex model dispatch or publication.

[REV-002] · medium · resolved · blocks:yes — Claude's publication allowlist grants more access than each stage needs

Paths: scripts/cycle.py, scripts/executors.py, README.md.

Corrected and regression-verified: Claude's allowlist is assembled from the role contract; review/rereview receive only gh pr comment, and the tests cover the role-specific command sets and branch-name filtering.

[REV-003] · low · open · blocks:no — No CHANGELOG.md entry

Path: CHANGELOG.md.

Still reproducible: the accumulated PR diff still has no changelog entry. The later resolution comment uses this same ID for a different finding below.

[REV-003] · high · resolved · blocks:yes — GitHub write collaborators fail the publication preflight

Path: scripts/executors.py.

The resolution comment says the preflight was updated to accept viewerPermission: WRITE and adds a regression test. The current full unit suite passes. This is a separate concern from the original REV-003 above, which is the ID collision.

[REV-004] · medium · open · blocks:yes — Codex publication does not enforce the role's allowed operations

Paths: scripts/cycle.py, scripts/executors.py; the network allowlist is at scripts/executors.py:654.

Still reproducible. The role contract says review and rereview may only comment, but the Codex profile only restricts network destinations to GitHub and Bitbucket. It does not constrain the API actions available through credentials reachable by the dispatched process. A reviewer can therefore use those hosts for operations beyond commenting, including pushing or other writes permitted by the ambient token. This conflicts with issue #49's least-privilege acceptance criterion. The README describes host scoping but does not explain this action-level residual risk.

Security triage

This is a sensitive change because it grants agents outbound network access and publication commands while using the user's provider credentials. The scoped audit confirmed REV-004 above. Claude's changed command allowlist matches each declared role; no additional confirmed vulnerability was found in the reviewed surface.

Verification

  • python3 -m unittest discover -s tests -p test_executors.py — passed, 122 tests.
  • python3 -m unittest discover -s tests -p test_cycle.py — passed, 40 tests.
  • python3 -m unittest discover -s tests — passed, 606 tests.
  • python3 scripts/validate-package.py — passed.
  • git diff --check 0a94152773ecfe1cf95339b1426e64443ba34819...HEAD — passed.
  • No live publication through Codex or Claude was run.

CI and verdict

GitHub reports 4/4 checks successful on HEAD 4f713cc0d207b1fcdc97c349940374b808bc4324: Skills, manifests, and Bash installer (twice) and PowerShell installer (twice). None are pending or failed.

REV-004 blocks approval. REV-003's duplicate identity independently prevents a safe recovered verdict. Project verdict: BLOCKED.

@datacas

datacas commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Correction of review record — PR #54

This is an owner-authorized correction of an ID collision, not a new finding. The re-review at HEAD 4f713cc0d207b1fcdc97c349940374b808bc4324 found that two different findings claimed REV-003 and correctly returned BLOCKED instead of renumbering either one. The repository owner resolved the ambiguity explicitly as follows:

  • REV-003 remains the original finding from the initial review (comment 5798134937): "No CHANGELOG.md entry".
  • The later finding that the resolve run (comment 5798401333) published as REV-003 by mistake is reassigned to REV-005: "GitHub write collaborators fail the publication preflight".

REV-005 is the next free ID after the highest ID in the record, REV-004. No other ID changes.

[REV-003] · low · open · blocks:no — No CHANGELOG.md entry

Path: CHANGELOG.md. Same as in the initial review.

[REV-005] · high · resolved · blocks:yes — GitHub write collaborators fail the publication preflight

Path: scripts/executors.py. Formerly published as REV-003 in comment 5798401333. It was resolved in e2bed5793e36e821017b2500fa526ca2481f0772: the preflight accepts viewerPermission: WRITE.

Later runs should recover REV-003 and REV-005 as described above.

The owner changed the requirement behind REV-004: agents keep their normal
gh, git and GitHub access, and the role contract becomes a behavioural
publication policy rather than a per-operation permission.

- Every stage's prompt states its allowed publication operations and the
  prohibitions that apply to all stages (no merge, force push, ref deletion,
  base-branch change, unrequested closing, or cross-stage publication).
- Publishing Claude stages receive gh and git instead of narrowed commands.
- README states that the boundary is behavioural and the preflight is a
  readiness check, not enforcement.
- CHANGELOG entry for the publication work (REV-003).
@datacas datacas changed the title fix: habilita publicación con permisos mínimos por etapa fix: habilita publicación con política conductual por etapa Sep 23, 2026
@datacas

datacas commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Resolve comments — PR #54

Functional status: RESOLVED. Previous HEAD: 4f713cc0d207b1fcdc97c349940374b808bc4324. New HEAD: fa81ee4 (fix commit). The IDs follow the published correction (comment 5801969261): REV-003 is the CHANGELOG finding, and REV-005 is the viewerPermission: WRITE finding.

Owner requirement change. The repository owner changed the architecture decision behind REV-004. The publication boundary is now behavioural. Codex and Claude keep their normal gh, git, and GitHub network access. RoleContract is a publication policy stated in each stage's prompt, not a permission enforced per operation. Issue #49's acceptance criterion "no dispatch receives more access than its role needs to publish" was removed and replaced accordingly. The README states that the toolkit does not technically prevent unlisted GitHub operations.

[REV-001] · high · resolved · blocks:yes — Codex publish-profile domain overrides fail to parse

Path: scripts/executors.py. Resolved in e2bed5793e36e821017b2500fa526ca2481f0772 (inline table), unchanged at fa81ee4. Covered by the executor tests.

[REV-002] · medium · not_applicable · blocks:no — Claude's publication allowlist grants far more than publishing

Path: scripts/executors.py. The narrowed per-command allowlist from e2bed57 is intentionally reverted by the owner's decision. A publishing Claude stage now receives Bash(gh:*) and Bash(git:*). The stage's allowed operations and the common prohibitions (no merge, force push, ref deletion, base-branch change, unrequested closing, or publication for another stage) are stated in its prompt by cycle.publication_policy. Anchor: fa81ee4.

[REV-003] · low · resolved · blocks:no — No CHANGELOG.md entry

Path: CHANGELOG.md. Resolved in fa81ee4: two [Unreleased] entries covering the publication policy, the readiness check, publication_access, and the Codex 0.138.0 minimum.

[REV-004] · medium · not_applicable · blocks:no — Codex publication does not enforce the role's allowed operations

Paths: scripts/cycle.py, README.md. Closed as an explicit requirement change and a risk the owner accepts. It is not closed by a technical fix: no per-operation enforcement exists, for Codex or Claude. The finding is correct against the old requirement. While investigating it, a live run also showed that user Codex exec-policy rules (~/.codex/rules) run commands such as gh api outside the sandbox. That confirms that host scoping never limited actions. What changed in fa81ee4:

  • every stage's prompt now states its policy;
  • the README describes the boundary as behavioural;
  • the preflight is described as a readiness check, not enforcement.

[REV-005] · high · resolved · blocks:yes — GitHub write collaborators fail the publication preflight

Path: scripts/executors.py. Resolved in e2bed5793e36e821017b2500fa526ca2481f0772 (previously published as REV-003). Unchanged at fa81ee4.

Changes in fa81ee4

  • scripts/cycle.py: publication_policy() appends the role's allowed and forbidden operations to every dispatched stage, including "publishes nothing" for non-publishing and local-only stages.
  • scripts/executors.py: publishing Claude stages receive gh and git instead of narrowed commands. The Codex profile, the preflight, and fail-closed adapters are unchanged.
  • Tests: the policy text for review, resolve, implement, and local-only; Claude publishing and non-publishing argv.
  • README.md, CHANGELOG.md, issue Los ejecutores no pueden publicar en GitHub en un ciclo real: Codex sin red en workspace-write y Claude sin permiso para comandos #49, and the PR description are updated.

Verification

  • python3 -m unittest discover -s tests -q: 605 tests passed.
  • python3 scripts/validate-package.py: VALID.
  • git diff --check: clean.
  • CI on fa81ee4: 4/4 passed (Skills, manifests, and Bash installer and PowerShell installer, each for push and pull_request).
  • Not verified: a live publishing cycle against the sandbox repository.

Review and security triage

A code-review pass over the accumulated diff found no new defects. The change is security-sensitive because it widens Claude's GitHub commands. That widening is the owner-accepted risk described above; no other vulnerability was found.

Residual risks

  • A stage that disregards its prompt can merge, force-push, or close items with the user's credentials. Use a separate credential or repository protections when a hard guarantee is needed.
  • The prompt policy can conflict with a skill's own instructions. The policy is appended last and names the stage.

@datacas

datacas commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Re-review — PR #54

Functional status: BLOCKED. Reviewed HEAD: cb56880c3cadd772264e0edce5edf7be1fc215a0. Previous reviewed feature HEAD: fa81ee46f562677260875c370e965da5fe01dbc5. The PR branch now includes a merge from updated main (947f45ea5525657df6a9668543588c96d167d0f7); the publication implementation and its tests have no changes since fa81ee4.

Summary and finding state

The owner-authored correction in comment 5801969261 resolves the earlier ID collision: REV-003 is the changelog entry and the preflight issue is REV-005. The owner’s requirement change and resolution of REV-004 are recorded in comment 5802748930. The current PR diff is 10 files against merge-base 947f45e.

[REV-001] · high · resolved · blocks:yes — Codex publish-profile domain overrides fail to parse

Path: scripts/executors.py.

Resolved in e2bed57 with an inline TOML domain table. The executor regression tests and full suite passed at fa81ee4 (605 tests, per the prior verification record); the Codex profile code is unchanged in the current diff.

[REV-002] · medium · not_applicable · blocks:no — Claude's publication allowlist grants more access than each stage needs

Path: scripts/executors.py.

The owner intentionally changed the boundary to behavioural. Claude receives gh and git, and the per-stage allowed operations and prohibitions are appended to its prompt. The README states plainly that this does not technically restrict those commands.

[REV-003] · low · resolved · blocks:no — No CHANGELOG.md entry

Path: CHANGELOG.md.

Resolved in fa81ee4 with two [Unreleased] entries covering the publication policy and readiness check.

[REV-004] · medium · not_applicable · blocks:no — Codex publication does not enforce the role's allowed operations

Paths: scripts/cycle.py, README.md.

The code still does not enforce per-operation limits. The owner removed that acceptance criterion and explicitly chose a behavioural boundary; the role policy is appended to each stage prompt and the README documents that agents retain normal GitHub access and may disregard the policy. This is an accepted residual risk under the updated requirement.

[REV-005] · high · resolved · blocks:yes — GitHub write collaborators fail the publication preflight

Path: scripts/executors.py.

Resolved in e2bed57: the preflight accepts viewerPermission: WRITE; the regression test is present and the prior full suite passed.

Security triage

The change remains sensitive because agents keep access to gh, git, MCP servers, and the user's credentials. I reviewed the prompt policy, its dispatch point, executor arguments, and the disclosure in README/CHANGELOG. The remaining ability to perform unlisted operations is documented and owner-accepted; I found no additional confirmed vulnerability in the current PR diff.

Verification

  • Prior verification at fa81ee4: python3 -m unittest discover -s tests -q — 605 tests passed; python3 scripts/validate-package.py — passed; git diff --check — clean.
  • Current HEAD cb56880: GitHub reports 4/4 checks successful: Skills, manifests, and Bash installer (twice) and PowerShell installer (twice). None are pending or failed.
  • The current local checkout could not fetch the updated branch because .git/FETCH_HEAD is read-only. I inspected the current PR diff and files through GitHub; the publication implementation and tests have not changed since the verified fa81ee4 feature head.
  • Not verified: issue Los ejecutores no pueden publicar en GitHub en un ciclo real: Codex sin red en workspace-write y Claude sin permiso para comandos #49 still requires a live cycle in a test repository to open a PR and publish its review. The prior review also records this as unverified. Running it would create an external PR/comment, so I did not perform it without authorization.

Verdict

All recovered findings are resolved or not applicable, and current CI is green. The live acceptance criterion remains unverified, so the project verdict is BLOCKED pending that evidence. May I run the live acceptance cycle in the sandbox? It will create a PR and review comment there.

@datacas

datacas commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Re-review — PR #54

Functional status: BLOCKED. Reviewed HEAD: cb56880c3cadd772264e0edce5edf7be1fc215a0.

Findings and verification

The recovered findings remain as recorded in the previous rereview: REV-001, REV-003, and REV-005 are resolved; REV-002 and REV-004 are not applicable under the owner's documented behavioural-boundary decision. No new code finding was identified. All four current CI checks pass.

I ran the authorized live acceptance cycle against the private sandbox repository, issue #2. The first attempt was blocked because the command sandbox could not authenticate direct GitHub CLI calls. Retrying with host network access passed the runner's publication preflight and started implementation, but the agent then reported that its authenticated connector and GitHub API both returned 404 for the private repository and issue. The cycle stopped at HUMAN_INTERVENTION; no sandbox PR was created and the issue remains open.

This leaves issue #49's live publication acceptance criterion unverified. The block is for that missing evidence, not an unresolved code finding. PR #54 remains open, and GitHub currently has no formal review decision.

Verdict

BLOCKED pending a successful live cycle that creates the sandbox PR and publishes its review comment. The current GitHub state is not formally approved.

@datacas

datacas commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Live publication acceptance — evidence

A live cycle passed at PR HEAD cb56880c3cadd772264e0edce5edf7be1fc215a0. This closes the evidence gap recorded in the last re-review (comment 5803369008). It is evidence for issue #49's live acceptance criterion, not a code change.

Setup. scripts/run_cycle.py from this branch ran on the host, not inside another agent's sandbox, against a fresh clone of datacas/code-cycle-sandbox:

run_cycle.py --task 2 --difficulty 1 --verifiability auto --cwd <clone> --timeout 2400 --database <isolated telemetry>

The skills were installed from this repository in project scope inside the clone and excluded from Git. Global user configuration was left unchanged. The sandbox's own .code-cycle.yml and profiles were used.

Result: READY_FOR_MANUAL_MERGE.

Stage Executor / model Dispatch Reported Published
implement codex / gpt-5.6-luna (publishing profile, workspace-write) succeeded IMPLEMENTED pushed issue-2-truncate (c2b9798) and opened sandbox PR #6
review codex / gpt-5.6-terra (publishing profile, read-only) succeeded APPROVED review comment on PR #6
  • No row recorded missing_capability=publication_access; the preflight passed before each publishing dispatch.
  • The behavioural policy was respected. Sandbox PR Router v1 #6 is open and unmerged. main is unchanged at 1272bcf, and issue Add optional Claude Codex orchestration #2 is still open.

On the earlier 404. From the host, gh inside the Codex publishing profile authenticates through Codex's network proxy and reads the private repository (gh repo view datacas/code-cycle-sandbox → PRIVATE). The earlier failure is consistent with running the cycle nested inside another agent's command sandbox, where the host credentials and network were not available. It does not point to a defect in this branch.

Side observation, not a blocker for this PR. The review comment's run line reports senior_reviewer · openai/gpt-5→?, while the runtime routed the reviewer profile to gpt-5.6-terra. That line is the skill's self-report, and telemetry records the routed profile and model correctly.

@datacas

datacas commented Sep 23, 2026

Copy link
Copy Markdown
Owner Author

Re-review — PR #54

Functional status: APPROVED. Reviewed HEAD: cb56880c3cadd772264e0edce5edf7be1fc215a0, which is the current head. Previous reviewed HEAD: cb56880c3cadd772264e0edce5edf7be1fc215a0 (comment 5803369008). Base main, merge-base 947f45ea5525657df6a9668543588c96d167d0f7. The accumulated diff touches 10 files (+496/−17).

What changed since the previous re-review

No code changes. The only new input is the live acceptance evidence (comment 5803659482), which was the single reason for the previous BLOCKED verdict.

Previous findings

The IDs follow the published correction (comment 5801969261). There is no collision.

[REV-001] · high · resolved · blocks:yes — Codex publish-profile domain overrides fail to parse

Path: scripts/executors.py. Corrected and verified by execution. The Codex CLI 0.156.1 loads the exact -c overrides built by CodexAdapter.argv(..., publishes=True) for both profiles. codex sandbox with them runs gh repo view on the private sandbox and returns PRIVATE for read and for write. The live cycle ran both publishing Codex profiles successfully.

[REV-002] · medium · not_applicable · blocks:no — Claude's publication allowlist grants far more than publishing

Path: scripts/executors.py. Obsolete under the owner's requirement change: the publication boundary is behavioural. A publishing Claude stage intentionally receives Bash(gh:*) and Bash(git:*). README.md and issue #49 document this.

[REV-003] · low · resolved · blocks:no — No CHANGELOG.md entry

Path: CHANGELOG.md. Corrected. The [Unreleased] section has the "Publication policy per stage" and readiness-check entries.

[REV-004] · medium · not_applicable · blocks:no — Codex publication does not enforce the role's allowed operations

Paths: scripts/cycle.py, README.md. Closed as an explicit owner requirement change and accepted risk, not as a technical fix. README.md states "This publication boundary is behavioural, not technical". Issue #49's acceptance criteria record the change. Every stage's prompt carries its policy through cycle.publication_policy.

[REV-005] · high · resolved · blocks:yes — GitHub write collaborators fail the publication preflight

Path: scripts/executors.py. Corrected and verified. PublicationPreflightTests with viewerPermission: WRITE passes. The live preflight passed before each publishing dispatch.

No new findings.

Live acceptance (issue #49)

The live cycle on datacas/code-cycle-sandbox issue #2 ended with READY_FOR_MANUAL_MERGE, and I checked the result on the provider:

Both of #49's live criteria (open the PR and publish the review) are now observed.

Security triage

Sensitive change: it grants network access and GitHub commands to agent executors, and adds a host-side credential readiness check. Scoped audit:

  • The preflight does not change remote state. git push --dry-run targets an unused ref, and its details carry exit codes only, never tokens or remote URLs.
  • Codex publishing profiles keep the stage's filesystem sandbox and allow network to the code hosts only.
  • Claude's gh/git access and agents acting with the user's credentials are the owner-accepted behavioural boundary, documented in the README.

No other vulnerability found.

Verification

  • python3 -m unittest discover -s tests: 610 tests passed.
  • python3 scripts/validate-package.py: VALID.
  • git diff --check 947f45e HEAD: clean.
  • Real Codex config load for both publishing profiles: exit 0. Provider state of sandbox PR Router v1 #6: checked.

CI

gh pr checks 54: 4/4 passed on cb56880. Skills, manifests, and Bash installer and PowerShell installer each passed for both push and pull_request. None are pending, failed, skipped or missing.

Residual risks

  • The publication boundary depends on agents following their prompt. A stage that ignores it can use the user's credentials for any operation, as documented.
  • Out of scope, to be tracked separately: the review skill's run line self-reports senior_reviewer · openai/gpt-5→? while telemetry records the routed reviewer / gpt-5.6-terra.
  • Disclosure: the resolution commits, the live acceptance run, and this re-review ran in the same session.

Project verdict: APPROVED. reviewed_head_sha == head_sha, all checks passed, and no open finding blocks approval.

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.

Los ejecutores no pueden publicar en GitHub en un ciclo real: Codex sin red en workspace-write y Claude sin permiso para comandos

1 participant