Repository navigation
fix: Gate PAPER WIF checks after target selection (R2) - #703
Merged
Merged
Conversation
Collaborator
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
marked this pull request as ready for review
November 5, 2026 10:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI assistance
Codex (GPT-6).
What changed
R2 follow-up for original PR #702, reviewed head
895ae02ce31fbc03d04d46761c52f4737b177aca, squash commit44a4a811d99161626dbc2d2af9a69c84d49bfb8c: fix post-merge finding F1 (P2). An excluded or disabled PAPER matrix row currently reads and validates PAPER WIF Secrets before selection. Select and check enablement first with inherited identity fields blanked; only a selected, enabled PAPER row reads Secrets and runs the unchanged strict validation and early component masking, before checkout.Files touched:
sync-cloud-run-env.yml: reorder selection and gate PAPER identity masking on enabled selection.runtime-target-manifest.md: describe selection before PAPER Secret access.test_paper_deploy_wif_binding.py: exercise actual script sequencing, disabled/excluded cases, fail-closed validation, and masking order.test_sync_cloud_run_env_workflow.sh: preserve existing contracts and add selection/blank-environment assertions.Follow-up to a post-merge re-review; no approval implied.
How verified
Fresh independent worktrees from live main
c9cb033cf434fcadeb3547c92c08f984fe2a73c3; source checkout read only. Baseline tracked tree remained unmodified. Dependency refs and lockfile unchanged. SG egress guard passed before network work.PYTHONPATH=. uv run --no-sync python -m pytest -q tests --cov --cov-report=term --cov-report=xml(Python 3.12.15,PYTEST_ADDOPTS=-rsonly to disclose skip reasons). Main: 3007 passed, 1 skipped, 420 subtests passed; candidate: 3017 passed, 1 skipped, 420 subtests passed. Both exited 0 with the same two warnings and 74% coverage.tests/test_phase5_offline_adapter.py:159, reasonapproved local frozen research inputs not attached. It is baseline, not a new failure; no tests were skipped, deleted, weakened or retuned by this patch. The older job's skip description was not reused as current evidence.uv lock --check, ruff, bounded deployment shell contract (92 image-only and 9 lifecycle cases), Dot review (11 tests), public configuration scanner regressions (14 tests) and real scan, docs checker tests (36), phase-2 docs check, actionlint 1.7.12 andgit diff --checkpassed. Docs check has the same existing README-outline advisory.6ad9627e588bfe474fa14130fb03af948f74d03e: PASS, total matches 0, blocking 0, advisory 0. Loaded the exact pinned script from the organization repository usinggit show, without modifying it, and ran its naming/link/language/leak/internal-path checks over all four changed complete files including documentation. Root context was the clean candidate; unrelated metadata checks were excluded from this bounded result. Normal full repository docs checks also passed.publication-check/2.0-advisory, build2947dd7867b4, advisory mode: 97 matching lines / 97 findings on exactly the four changed complete files, equal to 97 / 97 on their unmodified-main counterparts. No matched new-content line is absent from its baseline file. These are existing matches; the owner explicitly authorized advisory publication for this M04 follow-up. Full tracked-tree scan is recorded in the worker report. No real credential is included.Publication checker first 20 changed-file locations (no matching values):
.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:79.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:84.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:122.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:127.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:162.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:212.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:213.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:214.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:215.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:216.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:217.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:295.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:343.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:457.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:463.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:501.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:533.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:586.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:600.<PROJECT_ID>/workflows/sync-cloud-run-env.yml:614Full tracked candidate tree: checker
publication-check/2.0-advisory, build2947dd7867b4, 1474 total findings / 1463 matching lines, advisory, exit 0. Unchanged files are inherited from the exact baseline; changed-file finding counts are equal to baseline. First 20 full-tree masked matches:Masked whole-tree scanner receipt
.env.example:21:TELEGRAM_TOKEN=<<HOST>>.<PROJECT_ID>/CODEOWNERS:7:/.env.example @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:8:/.<PROJECT_ID>/CODEOWNERS @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:9:/.<PROJECT_ID>/workflows/ @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:10:/application/account_new_risk_gate_support.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:11:/application/durable_execution_commands.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:12:/application/execution_receipt_adapter.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:13:/application/execution_service.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:14:/application/execution_state.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:15:/application/longbridge_execution.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:16:/application/paper_execution_command_consumer.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:17:/application/paper_strategy_risk_state.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:18:/runtime_execution_policy.py @<PROJECT_ID>.<PROJECT_ID>/CODEOWNERS:19:/scripts/execution_report_heartbeat.py @<PROJECT_ID>.<PROJECT_ID>/dot-review/review.cjs:106:const token = <REDACTED> core.getIDToken(audienceText); // Exact bytes; URL normalization may change an audience..<PROJECT_ID>/dot-review/review.cjs:190:const <PROJECT_ID> = {...pr,head:{...pr.head,sha:pair.target},base:{...pr.base,sha:pair.base}};.<PROJECT_ID>/dot-review/review.cjs:191:const binding = {...b.binding({repository:trust.repo.full_name,pr:<PROJECT_ID>,policyCommit:trust.commit,files},trust.policySha),.<PROJECT_ID>/dot-review/test-review.cjs:81:const content='<PROJECT_ID> source\n', sourceSHA='d'.repeat(40);.<PROJECT_ID>/dot-review/test-review.cjs:82:const pr={number:7,changed_files:1,commits:1,title:'<PROJECT_ID> change',body:'<PROJECT_ID> body',.<PROJECT_ID>/dot-review/test-review.cjs:100:assert.equal(audience,'https://audience.example.test');return '<PROJECT_ID>-only';},summary};Detailed fail-before, pass-after, baseline/candidate validation and scanner receipts are retained in the worker job's
out/artifacts, outside the repository.Why
A PAPER row excluded by HK-only targeting, or with automation disabled, must not fail because unused PAPER identity Secrets are missing or malformed. Enabled PAPER rows must continue to fail closed on malformed/missing identities and register component masks before later step logs can expose them.
Risk
Workflow authentication ordering is affected, so treat the workflow path as high risk. The selected/enabled PAPER validation script is unchanged; regression tests retain missing/malformed account/provider checks and the image-only first-step masking requirement. Selection blanks all five inherited cloud identity fields and binds no PAPER Secrets. Concurrency/restart and stale-snapshot checklist items are N/A: this is sequential per-job selection without new shared or persisted state.
Validation is offline. No hosted deployment, Secret binding, WIF authentication or runtime adoption is claimed. No deployment, workflow dispatch, configuration, IAM, Secret/Variable, trading, Kelly or stop-loss operation is part of this follow-up. This is a Draft PR awaiting the established review-and-merge bot.