Skip to content

ci: combined main-unblock base (#3524 #3525 #3528 #3529 #3548 #3550 #3546 #3535) - #3552

Merged
PetrefiedThunder merged 35 commits into
mainfrom
codex/main-unblock-combined
Oct 23, 2026
Merged

PetrefiedThunder merged 35 commits into
mainfrom
codex/main-unblock-combined

Conversation

@PetrefiedThunder

@PetrefiedThunder PetrefiedThunder commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Combined base PR to break the main CI deadlock (each fix could only go green after the others landed). Built off origin/main with merge commits only (no rebase).

Combines and supersedes:

On top:

  • requirements.in pypdf floor raised to >=6.21.2; requirements.lock re-run through pip-compile (already at 6.21.2, no change); packages/factory-local/requirements.lock regenerated with the repo's uv command (pypdf 6.21.1 -> 6.21.2).
  • Conflicts: frontend/package.json knip.entry kept the superset (tests/visual/**/*.ts and src/lib/capabilities.ts, which is unimported for now and allowlisted so the Unused File Guard stops flagging it; JSON has no comments, so this is the note). scripts/ci/check_supply_chain.py kept fix(frontend): restore main build after ErrorState collision (SEL-410/SEL-414) #3524's USES_RE; all tests from both sides pass (101). workflow_inventory.txt merged cleanly.

Remaining suite fixes will be folded in as their owners push them (ingestion 2868/1342, receipt_944/email CSV/sel409, RLS, Tenant Isolation, Secrets Audit). All data-free.

Grok reviews this PR; DevOps merges it when CI is green.


Note

Medium Risk
Touches branch-protection guard behavior, dependency CVE floor, and API route manifest counts, but most product changes are error UI and test harnesses rather than new auth or data paths.

Overview
Combined main-unblock PR that lands several interdependent CI and product fixes in one merge.

CI / supply chain: Pins copy-lint to digest-pinned checkout/setup-node and disables persisted credentials. Head SHA Check Guard still posts commit statuses on PR heads but only fails the workflow job on pull_request events (warnings on check_suite / workflow_run so default-branch runs are not marked failed). Tightens check_supply_chain action-pin parsing so permissions.statuses is not mistaken for uses, with matching tests; updates workflow inventory and Vercel preview workflow secret-scan allowlist comments.

Frontend: Extends ErrorState with optional requestId, retrying (disabled button + “Retrying…”), and a Contact support link; related page/tests and dashboard attention table no longer tie loading to QA status. Supplier dashboard lot-code tile scopes “No data yet” via shared NO_DATA_YET. Knip allowlists visual Playwright entrypoints and capabilities.ts.

Security / deps: Bumps pypdf to 6.21.2 (CVE notes) across root and factory-local locks. Route security manifest counts +2 tenant-scoped supplier facility routes (254 enabled ops).

Tests (data-free / honest-empty): Rewrites #2868 ingest failure logging tests around structlog JSON and direct _failure_diagnostics checks; EPCIS export tests expect real empty payloads (no sample events); EDI 944/945 envelope tests use synthetic X12 instead of removed fixtures; SEL-409 session test sets test env/SQLite; assorted ingestion test stub/signature fixes.

Reviewed by Cursor Bugbot for commit 8ed7c06. Bugbot is set up for automated code reviews on this repo. Configure here.

PetrefiedThunder and others added 23 commits October 23, 2026 02:48
Remove SAMPLE_EPCIS_EVENTS and the hardcoded FDA sample CSV. Tenants with
no rows now get an empty eventList / header-only CSV, count 0,
dataSource 'empty' and a 'No data yet' message. Tests are data-free.
Drop the now-stale detect-secrets baseline entries for the sample hashes.

Signed-off-by: Christopher Sellers <1@christophersellers.com>
…llision

#3475 and #3479 merged back to back and both defined ErrorState. The
surviving component lacked requestId/retrying used by #3479 callers, a
test mock had a duplicate useQAHealth key, and suppliers/page.tsx used
NO_DATA_YET without importing it. Vercel production builds for 03903ee
and e7ee4a7 failed type check; prod is still on c7874cb.

- ErrorState: optional requestId line, retrying disables Retry and shows
  Retrying..., support link, className kept on root
- drop duplicate useQAHealth mock key
- import NO_DATA_YET in suppliers page
…st-empty

# Conflicts:
#	services/ingestion/tests/test_epcis_export_1342.py
… workflows, allowlist false-positive secret, declare visual/capabilities knip entries)
…ection

test_ingest_error_logging_2868.py imported _FakePersistence, _FakeSession, _client and _make_shipping_event from test_webhook_router_v2_1342.py, which the real-data-only cleanup removed, so collection failed on main. Drop the ingest-batch route cases that needed a fabricated event, test _failure_diagnostics directly with no payload, and keep the chain-verify case using MagicMock and a local app builder. Remove the stale detect-secrets baseline entry.

Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
… for #2868

Mint TENANT_ID and KEY_ID with uuid4 at runtime. Re-add a POST /api/v1/webhooks/ingest failure test that uses caplog to check the traceback, tenant_id, event_count, source, error_type and correlation_id, and that the uuid4 canary lot code, product text and location never reach the log. A MagicMock persistence store raises to reach the handler's except block.

Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
…dmin DB env

Signed-off-by: Christopher Sellers <1@christophersellers.com>
…st' into codex/main-unblock-combined

# Conflicts:
#	frontend/package.json
… drop SAMPLE_EPCIS_EVENTS expectations

Signed-off-by: Christopher <131207452+PetrefiedThunder@users.noreply.github.com>
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
regengine Ready Ready Preview Oct 23, 2026 10:20pm UTC

@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: c22121d8-2b91-40df-94d2-0580e6f68d20)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-10-23T21:41:51.673542Z 1d3e137 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.

…to codex/main-unblock-combined

# Conflicts:
#	scripts/ci/check_supply_chain.py
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 1d3e137 and 8ed7c06.

📒 Files selected for processing: 10
  • .github/workflows/copy-lint.yml
  • .github/workflows/vercel-preview-guard.yml
  • .secrets.baseline
  • frontend/src/__tests__/components/error-state.test.tsx
  • frontend/src/__tests__/pages/dashboard-load-errors.test.tsx
  • frontend/src/components/ui/error-state.tsx
  • packages/factory-local/requirements.txt
  • services/ingestion/tests/test_edi_envelope_integrity.py
  • services/ingestion/tests/test_ingest_error_logging_2868.py
  • tests/scripts/test_check_supply_chain.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The changes update CI guard behavior, action-reference scanning, workflow inventory, and supply-chain records. The frontend ErrorState component adds retry and request-ID display states, while dashboard status handling and related tests are adjusted. Ingestion tests revise EDI, EPCIS, email, failure-diagnostics, and session-authentication coverage. Route-security manifest tests update expected operation and route counts.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: 🟡 Moderate · up to 8ed7c

The ingestion redaction tests still leave exception-carried request data unprotected by the new coverage. Resolve or explicitly accept that gap before merging.

Security architecture risk: 🟡 Moderate · up to 8ed7c

The preview workflow publishes an access-bypass credential in pull-request comments. That exposure predates this PR and is not expanded by the inspected changes. The error-display changes are presentation-only, but the diagnostic identifier’s sensitivity and the credential’s deployment restrictions remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — Readers of a credential-bearing pull-request comment can obtain the bypass value. The inspected PR does not expand that audience or workflow authority. Maximum deployment exposure cannot be bounded from the available evidence because the credential’s effective scope, lifetime and external repository policies are unverified.

Security Findings and Attack Paths

  • observed — The retained finding traces VERCEL_AUTOMATION_BYPASS_SECRET into the x-vercel-protection-bypass URL parameter and then into a pull-request comment. Log masking does not redact that API payload. This reportable condition remains, but comparison establishes that its source, sink and exposure are unchanged by this PR.

Trust Boundaries and Controls

  • observed — The workflow retains pull-request event gating, a Dependabot exclusion and pull-requests: write authority for comment publication. These limit invocation or API authority but do not keep a credential confidential once included in the comment body.
  • observed — The new identifier display is text rendering, not an HTML, URL or credential-use sink in the inspected component. This resolves its local destination, but does not establish the sensitivity or ultimate producer of error.digest; that proof gap is not a verified exposure finding.

Resilience and Maintainability Implications

  • observed — Preview failure or timeout prevents the dependent comment job from publishing a new link. Successful reruns update a marked comment, and per-PR concurrency cancels older runs. Neither failure nor cancellation removes a previously published credential-bearing comment; this retention behavior also predates the PR.

Hardening Proposals

  • proposed — Separate preview discovery from credential delivery: publish a credential-free URL, use an access mechanism restricted to intended reviewers, and establish revocation and historical-comment cleanup for previously published bypass values.
Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description provides a detailed change summary and related PR context, but it does not follow the required template sections for Type of Change, Test Plan, Checklist, and Related Issues. Rewrite the description using the repository template. Add the required section headings, select applicable Type of Change and Test Plan items, complete the Checklist, and list related issues or PRs in the Related Issues section.
Docstring Coverage Warning Docstring coverage is 9.80% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 51 functions across 15 files. (4 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the combined CI changes intended to unblock the main branch.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 9.80% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 51 functions across 15 files. (4 skipped: 4 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

PetrefiedThunder and others added 2 commits October 23, 2026 14:35
…ow_run events

Those events run in the default-branch context, so failed PR verdicts were
attributed to main. Keep the failure commit status on the PR head SHA; only
fail the job for pull_request events.
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file backend ci security Security vulnerabilities and concerns frontend agent:infra Issues found by Bot-Infra agent agent:ui Issues found by Bot-UI agent labels Oct 23, 2026
@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 919d9579-beff-45ce-a207-547d6ae95ea6)

…ame, EDI envelope literals, duplicate test name)
@cursor

cursor Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: dfb37cb8-4652-4048-a39b-1344dc95a4ea)

@PetrefiedThunder PetrefiedThunder left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVIEW: PASS grok 8ed7c06

Re-review of combined main-fix PR #3552 at 8ed7c06 (delta from my FAIL at 1d3e137). The PR head is unchanged at review time.

Prior findings, all resolved

  1. 2868 tests depended on run order. Fixed by a dedicated per-test logger fixture (services/ingestion/tests/test_ingest_error_logging_2868.py:123-154: uuid-named stdlib logger, propagate=False, wr.logger monkeypatched, handler removed on teardown). The full serial ingestion suite at the head now passes (exit 0, no failures; xfails are known).
  2. #3535 head 30cc483 is now an ancestor, via 182a4e4 and merge 28693c2.
  3. packages/factory-local/requirements.txt:11 now says pypdf>=6.21.2,<7, consistent with requirements.in and both locks.

Delta 1d3e137..8ed7c06

  • Non-merge commits: 30cc483, 182a4e4, e65bea9, 866471d, 8ed7c06. Merge: 28693c2. The net diff covers 10 files, all within the claimed scope.
  • 182a4e4 is not only line numbers: it drops the .secrets.baseline entries for services/ingestion/tests/test_epcis_gln_check_digit.py and test_qa4_webhook_inbound.py. That's justified: detect-secrets scan on both files at this head returns no results.
  • CodeRabbit fixes:
    • .github/workflows/copy-lint.yml:24-25: persist-credentials: false.
    • frontend/src/components/ui/error-state.tsx:38: the redundant conditional aria-label is removed, so the accessible name is the visible text.
    • test_edi_envelope_integrity.py:143-144: exact envelope asserts.
    • tests/scripts/test_check_supply_chain.py:100: the duplicate test name is renamed.
    • All sane. The EDI placeholder IDs are out of scope here (Lead is assigning them separately).

Tests (local, serial, py3.12)

  • services/ingestion/tests at the head: all pass, including test_ingest_error_logging_2868.py and test_fsma_readiness_compat_2893.py.
  • Codex's TestOperatorGate claim is not reproduced. On main 03903ee, with test_ingest_error_logging_2868.py excluded, the 2893 tests pass both in the full run and alone, and they pass at the head too. No run-order problem was observed either way.
  • Main's run (2868 excluded) fails in test_edi_envelope_integrity, test_email_ingest_service, test_epcis_export_1342 and test_sel409_session_auth. These are the pre-existing main blockers this PR fixes; all of them pass at the head.
  • ruff check and ruff format --check on the 8 changed .py files: clean.

CI (gh pr checks at review time): 82 pass, 6 fail, 4 pending, 13 skipping.

  • Failing: Engine Review Pass x3 (waits on a posted PASS review), PR Blocker Checklist x2, and visual-report (non-required).
  • Nothing failing is a code or test job.

Posted with C.Lee's approval ("Yes, post it", Oct 23, 2026, 3:44 PM PT).

This branch was successfully deployed

1 active deployment
Preview — 8ed7c068 Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:infra Issues found by Bot-Infra agent agent:ui Issues found by Bot-UI agent backend ci dependencies Pull requests that update a dependency file frontend security Security vulnerabilities and concerns

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant