Skip to content

fix: Categorize paper IAM HTTP failures safely - #718

Merged
Pigbibi merged 1 commit into
mainfrom
fix/paper-iam-http-status-observability
Nov 6, 2026
Merged

Pigbibi merged 1 commit into
mainfrom
fix/paper-iam-http-status-observability

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

AI assistance

Codex (GPT-6).

What changed

Add fixed HTTP failure categories for 401, 403, 429, 5xx and other errors in the bounded PAPER IAM adapter. Preserve fixed phase labels, accepted role-GET 404, transport separation, exit 1, no retry, and all authorization/mutation gates. Only the script and its existing focused tests change.

How verified

  • Adverse fail-before: 32 failed, 55 passed; pass-after focused: 87 passed.
  • Full Python suite: 3203 passed, 1 skipped, 431 subtests passed (3 deprecation warnings).
  • Ruff, git diff --check and 11 Node review contracts passed; documentation check: 0 blocking, 1 README advisory.
  • AST comparison: authority validation, role/policy validation, execute, IAM writes and CAS logic unchanged.
  • Fake-only hostile message/header/body/URL tests assert exact safe output, exit 1 and single attempt for each category and phase.
  • Central publication checker: publication-check/2.0-advisory, build 83d9d1130377: tracked tree findings=1487, matching lines=1476. Advisory only. Candidate script/tests findings=8, all unchanged baseline lines; added-line findings=0.

First 20 masked tracked-tree matches (pre-existing; advisory):

  • 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};

Why

The previously failed read emitted phase=role_get but discarded HTTP status, so the available evidence cannot distinguish authorization rejection from throttling or server failure. The existing phase observability change did not retain a status category. This patch makes a separately authorized future dry-run diagnosable without logging remote diagnostics. It does not establish the status of the historical failure or prove a missing permission.

Risk

Bounded diagnostic change on a protected operational path. No workflow/permission changes. No dry-run/apply dispatch, cloud/IAM/Env/Secret mutations, PAPER start, labels, undraft or merge. iam_apply=0; cloud_mutations=0; actions_*_dispatches=0; READY_FOR_START_CARD=false. PAPER remains stopped per task baseline; runtime was not inspected. No IAM grant card; permission need remains NOT_PROVEN. Coordinator must obtain a separate exact-revision review/merge card, followed by a separate ONE dry-run card; no apply implied.

@Pigbibi

Pigbibi commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the exact candidate head 86569ba for PR #718. Scope is HTTP-status diagnostic observability only. Please record the completed exact-head codex-review-state:v1 disposition. No deployment, IAM execution or PAPER start 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-06T13:40:41.431609Z 86569ba 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. What shall we delve into next?

Reviewed commit: 86569ba8c2

ℹ️ 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 13:39
@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 8ab0e6f into main Nov 6, 2026
14 of 16 checks passed
@Pigbibi
Pigbibi deleted the fix/paper-iam-http-status-observability branch November 6, 2026 13:42
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