Skip to content

fix: Observe executor permissions before PAPER IAM reads - #719

Merged
Pigbibi merged 1 commit into
mainfrom
fix/executor-permission-observations
Nov 6, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/executor-permission-observations

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

The executor's first role GET can return HTTP 403 without establishing the
missing permission. Add one bounded read-only projects.testIamPermissions
preflight over exactly iam.roles.get, resourcemanager.projects.getIamPolicy,
iam.roles.create and resourcemanager.projects.setIamPolicy.

Emit only fixed status/phase categories and the ordered missing allowlist subset.
Cap response input at 4096 bytes; malformed or failed observations stop with exit
1 and no retry or arbitrary remote output. A valid omitted permissions field
means none held. The result never authorizes a write. Original role/policy reads,
GET 404 handling, HTTP categories, identity checks, CAS and dry-run/apply gates
remain unchanged. Update the existing design note and fake-only tests.

How verified

  • New adverse cases fail before implementation: 16 failed.
  • Focused suite: 103 passed.
  • Full Python suite: 3219 passed, 1 skipped, 431 subtests passed; 3 deprecation warnings.
  • Ruff: all checks passed; git diff --check passed.
  • Central scripts/check_style.py: exit 0, 0 blocking, 1 README outline advisory.
  • Prior frozen dependency environment reused with identical uv.lock.

Scope and risk

Diagnostic observability code only. No cloud probe, dry-run, apply, IAM write,
Environment approval, Secret change, workflow dispatch or PAPER start.
Engineering merge only after exact-head CLEAN review and required checks pass.
Point-in-time permission observations do not prove API availability or successful
execution. Project setIamPolicy authority requires a separate future owner
decision before any apply. Follow-up execution needs its own exact-revision card.

AI assistance

Authored with OpenAI Codex, gpt-6.1-sol. PR governance and merge preparation by Codex.

Publication scan

publication-check/2.0-advisory build 83d9d1130377: findings=1487; matching_lines=1476. Advisory scan over the complete tracked candidate tree. No credential introduced by this diff. First 20 matches (shared-masked):

  • repo/.env.example:21 TELEGRAM_TOKEN=<<HOST>>
  • repo/.github/CODEOWNERS:7 /.env.example @<PROJECT_ID>
  • repo/.github/CODEOWNERS:8 /.github/CODEOWNERS @<PROJECT_ID>
  • repo/.github/CODEOWNERS:9 /.github/workflows/ @<PROJECT_ID>
  • repo/.github/CODEOWNERS:10 /application/account_new_risk_gate_support.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:11 /application/durable_execution_commands.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:12 /application/execution_receipt_adapter.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:13 /application/execution_service.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:14 /application/execution_state.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:15 /application/longbridge_execution.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:16 /application/paper_execution_command_consumer.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:17 /application/paper_strategy_risk_state.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:18 /runtime_execution_policy.py @<PROJECT_ID>
  • repo/.github/CODEOWNERS:19 /scripts/execution_report_heartbeat.py @<PROJECT_ID>
  • repo/.github/dot-review/review.cjs:106 const token = <REDACTED> core.getIDToken(audienceText); // Exact bytes; URL normalization may change an audience.
  • repo/.github/dot-review/review.cjs:190 const <PROJECT_ID> = {...pr,head:{...pr.head,sha:pair.target},base:{...pr.base,sha:pair.base}};
  • repo/.github/dot-review/review.cjs:191 const binding = {...b.binding({repository:trust.repo.full_name,pr:<PROJECT_ID>,policyCommit:trust.commit,files},trust.policySha),
  • repo/.github/dot-review/test-review.cjs:81 const content='<PROJECT_ID> source\n', sourceSHA='d'.repeat(40);
  • repo/.github/dot-review/test-review.cjs:82 const pr={number:7,changed_files:1,commits:1,title:'<PROJECT_ID> change',body:'<PROJECT_ID> body',
  • repo/.github/dot-review/test-review.cjs:100 assert.equal(audience,'https://audience.example.test');return '<PROJECT_ID>-only';},summary};

@Pigbibi

Pigbibi commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current diagnostic observability candidate at head 20ac180. Scope: the existing three-file testIamPermissions observability change only. No IAM mutation, execution workflow dispatch or PAPER activation is requested.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 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-11-06T15:00:33.792445Z 20ac180 Draft marked ready
ℹ️ 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 20ac1804e2

ℹ️ 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".

@Pigbibi
Pigbibi marked this pull request as ready for review November 6, 2026 14:59
@Pigbibi Pigbibi added the agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation label Nov 6, 2026
@Pigbibi
Pigbibi merged commit 47ecd96 into main Nov 6, 2026
15 of 18 checks passed
@Pigbibi
Pigbibi deleted the fix/executor-permission-observations branch November 6, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-approved An agent cleared this high-risk change on the current head; not an owner confirmation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants