wire the YiACAD service-first backend, web review read model, and evidence-pack contracts
add GitHub checks and evidence-pack visibility in /review and /diagram project shells
add sticky PR summary publishing and blocking PR gate logic in yiacad_product CI
Verification
python unittest contracts for backend, review, evidence-pack, PR summary, and PR comment flows
npm run build in web/
## Summary
- wire the YiACAD service-first backend, web review read model, and evidence-pack contracts
- add GitHub checks and evidence-pack visibility in /review and /diagram project shells
- add sticky PR summary publishing and blocking PR gate logic in yiacad_product CI
## Verification
- python unittest contracts for backend, review, evidence-pack, PR summary, and PR comment flows
- npm run build in web/
claude[bot]
(Migrated from github.com)
reviewed 2026-03-29 02:19:55 +00:00
claude[bot]
(Migrated from github.com)
left a comment
Copy Link
Copy Source
⚠️Code review skipped — your organization's overage spend limit has been reached.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, push a new commit or reopen this pull request to trigger a review.
⚠️ **Code review skipped** — your organization's overage spend limit has been reached.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at [claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code).
Once credits are available, push a new commit or reopen this pull request to trigger a review.
copilot-pull-request-reviewer[bot]
(Migrated from github.com)
reviewed 2026-03-29 02:23:34 +00:00
copilot-pull-request-reviewer[bot]
(Migrated from github.com)
left a comment
Copy Link
Copy Source
Pull request overview
This PR wires the YiACAD “PR review lane” across the web worker, GraphQL read model, CI evidence-pack outputs, and GitHub-facing PR summary publishing so the /review and project shells can surface checks/evidence and optionally publish a sticky PR summary.
Changes:
Route web EDA worker pipelines through tools/cad/yiacad_backend_client.py and persist richer CI run metadata (engine/summary/degraded reasons/timestamps).
Extend web GraphQL/types/UI to surface GitHub checks, evidence packs, PR assessment fields, and add a publishPullRequestSummary mutation.
Add CI utilities to generate evidence packs + sticky PR summary comments, and introduce a new “YiACAD Product” workflow plus evidence-pack publishing in kicad-exports.
Reviewed changes
Copilot reviewed 58 out of 58 changed files in this pull request and generated 4 comments.
Show a summary per file
File
Description
web/workers/eda-worker.mjs
Route EDA pipelines through backend client; persist CI run metadata + artifact summaries
web/lib/types.ts
Expand snapshot types for checks/evidence packs/PR fields and CI run metadata
web/lib/graphql/schema.ts
Add new GraphQL fields and publishPullRequestSummary mutation
This workflow runs on pull_request while granting pull-requests: write, and it checks out + executes code from the PR branch (Python + shell + npm build). That combination is a security risk because a malicious PR can run arbitrary code with a write-capable token (e.g., alter PR state/comments or attempt token exfiltration). Consider splitting the PR-comment publishing into a pull_request_target job that checks out the base ref (or otherwise avoids executing PR code), and keep PR builds/tests on pull_request with read-only permissions.
pull-requests: read
This workflow runs on `pull_request` while granting `pull-requests: write`, and it checks out + executes code from the PR branch (Python + shell + npm build). That combination is a security risk because a malicious PR can run arbitrary code with a write-capable token (e.g., alter PR state/comments or attempt token exfiltration). Consider splitting the PR-comment publishing into a `pull_request_target` job that checks out the base ref (or otherwise avoids executing PR code), and keep PR builds/tests on `pull_request` with read-only permissions.
```suggestion
pull-requests: read
```
github_request() does not send a User-Agent header. GitHub's API guidance expects a user agent, and some environments/proxies can reject requests without it. Add an explicit User-Agent (e.g., YiACAD-PR-Review/1.0) to make the integration more robust.
`github_request()` does not send a `User-Agent` header. GitHub's API guidance expects a user agent, and some environments/proxies can reject requests without it. Add an explicit `User-Agent` (e.g., `YiACAD-PR-Review/1.0`) to make the integration more robust.
publish_comment() only fetches the first 100 PR comments (per_page=100) and doesn't paginate. On PRs with >100 comments, the existing sticky marker comment could be missed and the script would create a duplicate summary comment instead of updating the original. Consider paging through results (following Link headers) until the marker is found, or querying in reverse chronological order and scanning until you hit the marker.
`publish_comment()` only fetches the first 100 PR comments (`per_page=100`) and doesn't paginate. On PRs with >100 comments, the existing sticky marker comment could be missed and the script would create a duplicate summary comment instead of updating the original. Consider paging through results (following `Link` headers) until the marker is found, or querying in reverse chronological order and scanning until you hit the marker.
redisConnection() now throws when REDIS_URL is unset, while web/workers/eda-worker.mjs still defaults to redis://127.0.0.1:6379. This inconsistency makes local usage fragile (enqueue will fail unless REDIS_URL is exported, but the worker will happily connect to localhost). Align the behavior by either restoring the localhost default here or requiring REDIS_URL in both places (with a clearer local-dev setup path).
`redisConnection()` now throws when `REDIS_URL` is unset, while `web/workers/eda-worker.mjs` still defaults to `redis://127.0.0.1:6379`. This inconsistency makes local usage fragile (enqueue will fail unless `REDIS_URL` is exported, but the worker will happily connect to localhost). Align the behavior by either restoring the localhost default here or requiring `REDIS_URL` in both places (with a clearer local-dev setup path).
chatgpt-codex-connector[bot]
(Migrated from github.com)
reviewed 2026-03-29 02:24:33 +00:00
chatgpt-codex-connector[bot]
(Migrated from github.com)
left a comment
Copy Link
Copy Source
💡 Codex Review
Here are some automated review suggestions for this pull request.
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".
### 💡 Codex Review
Here are some automated review suggestions for this pull request.
**Reviewed commit:** `30ec250a5c`
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
[Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). 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".
</details>
Parse backend JSON before rejecting non-zero exits
_run_json_command raises on any non-zero return code, but YiACAD commands can legitimately return non-zero while still emitting a structured --json-output contract (for example blocked runs or direct-fallback paths). Because run_intent depends on this helper and on_run expects a payload, the KiCad plugin cannot surface blocked/error details and instead fails the action flow when those cases occur.
Useful? React with 👍 / 👎.
**<sub><sub></sub></sub> Parse backend JSON before rejecting non-zero exits**
`_run_json_command` raises on any non-zero return code, but YiACAD commands can legitimately return non-zero while still emitting a structured `--json-output` contract (for example blocked runs or direct-fallback paths). Because `run_intent` depends on this helper and `on_run` expects a payload, the KiCad plugin cannot surface blocked/error details and instead fails the action flow when those cases occur.
Useful? React with 👍 / 👎.
Handle 404 from projects-current endpoint gracefully
This path calls http_json directly, but /projects/current can return HTTP 404 when no context snapshot exists. urllib.request.urlopen raises HTTPError on 404, so the command crashes instead of returning a controlled blocked result/exit code for fresh environments with no prior YiACAD run.
Useful? React with 👍 / 👎.
**<sub><sub></sub></sub> Handle 404 from projects-current endpoint gracefully**
This path calls `http_json` directly, but `/projects/current` can return HTTP 404 when no context snapshot exists. `urllib.request.urlopen` raises `HTTPError` on 404, so the command crashes instead of returning a controlled blocked result/exit code for fresh environments with no prior YiACAD run.
Useful? React with 👍 / 👎.
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".
### 💡 Codex Review
Here are some automated review suggestions for this pull request.
**Reviewed commit:** `a9d5bd346b`
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
[Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). 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".
</details>
Require successful evidence packs for CAD merge approval
This branch treats any attached evidence pack as sufficient, even when the pack status is failure, cancelled, or otherwise non-passing. In a CAD-affecting PR with green checks but a failed evidence workflow, the function still returns a favorable recommendation, which can mislead reviewers into merging without a successful CAD proof run. The recommendation should be based on passing evidence statuses, not just non-empty evidence.
Useful? React with 👍 / 👎.
**<sub><sub></sub></sub> Require successful evidence packs for CAD merge approval**
This branch treats any attached evidence pack as sufficient, even when the pack status is `failure`, `cancelled`, or otherwise non-passing. In a CAD-affecting PR with green checks but a failed evidence workflow, the function still returns a favorable recommendation, which can mislead reviewers into merging without a successful CAD proof run. The recommendation should be based on passing evidence statuses, not just non-empty evidence.
Useful? React with 👍 / 👎.
Paginate workflow runs before assessing evidence coverage
The review loader only requests the first page of workflow runs with a small cap (per_page=8) and does not paginate. For PR heads with more runs than that, tracked workflows can be absent from this slice even when they succeeded, which leaves evidencePacks incomplete and can incorrectly downgrade/blocks recommendations downstream. Fetch all relevant pages (or a robust filtered set) before deciding evidence availability.
Useful? React with 👍 / 👎.
**<sub><sub></sub></sub> Paginate workflow runs before assessing evidence coverage**
The review loader only requests the first page of workflow runs with a small cap (`per_page=8`) and does not paginate. For PR heads with more runs than that, tracked workflows can be absent from this slice even when they succeeded, which leaves `evidencePacks` incomplete and can incorrectly downgrade/blocks recommendations downstream. Fetch all relevant pages (or a robust filtered set) before deciding evidence availability.
Useful? React with 👍 / 👎.
chatgpt-codex-connector[bot]
(Migrated from github.com)
reviewed 2026-03-29 04:35:01 +00:00
chatgpt-codex-connector[bot]
(Migrated from github.com)
left a comment
Copy Link
Copy Source
💡 Codex Review
Here are some automated review suggestions for this pull request.
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".
### 💡 Codex Review
Here are some automated review suggestions for this pull request.
**Reviewed commit:** `ea6d2b039f`
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
[Your team has set up Codex to review pull requests in this repo](http://chatgpt.com/codex/settings/general). 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".
</details>
In the Discover schematics and PCBs step of .github/workflows/kicad-exports.yml, the new ignore glob uses *.kicad_block/* (singular) instead of */kicad_blocks/*, so schematics inside kicad_blocks/ are no longer excluded. On repos that vendor reusable block libraries there, ERC will run on those library sources and can produce false failures/noise that block the export lane.
Useful? React with 👍 / 👎.
**<sub><sub></sub></sub> Restore kicad_blocks exclusion pattern**
In the `Discover schematics and PCBs` step of `.github/workflows/kicad-exports.yml`, the new ignore glob uses `*.kicad_block/*` (singular) instead of `*/kicad_blocks/*`, so schematics inside `kicad_blocks/` are no longer excluded. On repos that vendor reusable block libraries there, ERC will run on those library sources and can produce false failures/noise that block the export lane.
Useful? React with 👍 / 👎.
Paginate issue comments before locating sticky marker
The sticky-comment updater only fetches ?per_page=100 once before searching for <!-- yiacad-pr-summary -->. For PRs with more than 100 comments, the existing summary comment may be on a later page, so this path posts a new comment instead of updating the original one, breaking idempotent “single sticky summary” behavior.
Useful? React with 👍 / 👎.
**<sub><sub></sub></sub> Paginate issue comments before locating sticky marker**
The sticky-comment updater only fetches `?per_page=100` once before searching for `<!-- yiacad-pr-summary -->`. For PRs with more than 100 comments, the existing summary comment may be on a later page, so this path posts a new comment instead of updating the original one, breaking idempotent “single sticky summary” behavior.
Useful? React with 👍 / 👎.
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Verification
⚠️ Code review skipped — your organization's overage spend limit has been reached.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, push a new commit or reopen this pull request to trigger a review.
Pull request overview
This PR wires the YiACAD “PR review lane” across the web worker, GraphQL read model, CI evidence-pack outputs, and GitHub-facing PR summary publishing so the
/reviewand project shells can surface checks/evidence and optionally publish a sticky PR summary.Changes:
tools/cad/yiacad_backend_client.pyand persist richer CI run metadata (engine/summary/degraded reasons/timestamps).publishPullRequestSummarymutation.kicad-exports.Reviewed changes
Copilot reviewed 58 out of 58 changed files in this pull request and generated 4 comments.
Show a summary per file
publishPullRequestSummarymutationREDIS_URL.cidir exists@@ -0,0 +39,4 @@actions: readchecks: readcontents: readpull-requests: writeThis workflow runs on
pull_requestwhile grantingpull-requests: write, and it checks out + executes code from the PR branch (Python + shell + npm build). That combination is a security risk because a malicious PR can run arbitrary code with a write-capable token (e.g., alter PR state/comments or attempt token exfiltration). Consider splitting the PR-comment publishing into apull_request_targetjob that checks out the base ref (or otherwise avoids executing PR code), and keep PR builds/tests onpull_requestwith read-only permissions.@@ -0,0 +24,4 @@"Authorization": f"Bearer {token}","Accept": "application/vnd.github+json","X-GitHub-Api-Version": "2022-11-28",}github_request()does not send aUser-Agentheader. GitHub's API guidance expects a user agent, and some environments/proxies can reject requests without it. Add an explicitUser-Agent(e.g.,YiACAD-PR-Review/1.0) to make the integration more robust.@@ -0,0 +65,4 @@comments = comments_raw if isinstance(comments_raw, list) else []existing = find_existing_comment([comment for comment in comments if isinstance(comment, dict)], marker)publish_comment()only fetches the first 100 PR comments (per_page=100) and doesn't paginate. On PRs with >100 comments, the existing sticky marker comment could be missed and the script would create a duplicate summary comment instead of updating the original. Consider paging through results (followingLinkheaders) until the marker is found, or querying in reverse chronological order and scanning until you hit the marker.@@ -24,2 +26,4 @@}const url = new URL(rawUrl);const db = url.pathname && url.pathname !== "/" ? Number(url.pathname.slice(1)) : 0;redisConnection()now throws whenREDIS_URLis unset, whileweb/workers/eda-worker.mjsstill defaults toredis://127.0.0.1:6379. This inconsistency makes local usage fragile (enqueue will fail unlessREDIS_URLis exported, but the worker will happily connect to localhost). Align the behavior by either restoring the localhost default here or requiringREDIS_URLin both places (with a clearer local-dev setup path).💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
30ec250a5cℹ️ About Codex in GitHub
Your 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".
@@ -59,0 +72,4 @@}return {"source_path": str(path), "board": "", "schematic": ""}_run_json_commandraises on any non-zero return code, but YiACAD commands can legitimately return non-zero while still emitting a structured--json-outputcontract (for example blocked runs or direct-fallback paths). Becauserun_intentdepends on this helper andon_runexpects a payload, the KiCad plugin cannot surface blocked/error details and instead fails the action flow when those cases occur.Useful? React with 👍 / 👎.
This path calls
http_jsondirectly, but/projects/currentcan return HTTP 404 when no context snapshot exists.urllib.request.urlopenraisesHTTPErroron 404, so the command crashes instead of returning a controlled blocked result/exit code for fresh environments with no prior YiACAD run.Useful? React with 👍 / 👎.
YiACAD PR Summary
feat/yiacad-pr-review-automation->mainfailedruntimehighblocking7c9c9169Assessment
GitHub Checks
in_progressyiacad-pr-reviewsuccessyiacad-evidence-packin_progressFirmware — ESP32-S3 buildsuccessFirmware — Unity tests (native)failureyiacad-backend-contractsfailurepython-stablefailurePlaywright E2Esuccessfirmware-lintin_progressHardware — KiCad ERC + exportssuccessyiacad-web-buildin_progresskicad-checkssuccesssecret_scanEvidence Packs
in_progressKiCad Exports: feat: automate yiacad PR review lane (run)failureEvidence Pack Validation: feat: automate yiacad PR review lane (run)in_progressYiACAD Product: feat: automate yiacad PR review lane (run)Changed Files
.github/agents/arch_mesh.md.github/agents/architect_agent.md.github/agents/doc_agent.md.github/agents/docs_research.md.github/agents/embedded_cad.md.github/agents/firmware.md.github/agents/firmware_agent.md.github/agents/hw_schematic_agent.md.github/agents/kill_life_bridge.md.github/agents/pm_agent.md.github/agents/pm_mesh.md.github/agents/qa_agent.mdNext Steps
Generated by YiACAD review lane from GitHub checks and tracked workflow evidence.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
a9d5bd346bℹ️ About Codex in GitHub
Your 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".
@@ -270,0 +738,4 @@if (pullRequest.changedFiles.length > 0) {lines.push(`### Changed Files`, ``);for (const filePath of pullRequest.changedFiles.slice(0, 8)) {lines.push(`- \`${filePath}\``);This branch treats any attached evidence pack as sufficient, even when the pack status is
failure,cancelled, or otherwise non-passing. In a CAD-affecting PR with green checks but a failed evidence workflow, the function still returns a favorable recommendation, which can mislead reviewers into merging without a successful CAD proof run. The recommendation should be based on passing evidence statuses, not just non-empty evidence.Useful? React with 👍 / 👎.
The review loader only requests the first page of workflow runs with a small cap (
per_page=8) and does not paginate. For PR heads with more runs than that, tracked workflows can be absent from this slice even when they succeeded, which leavesevidencePacksincomplete and can incorrectly downgrade/blocks recommendations downstream. Fetch all relevant pages (or a robust filtered set) before deciding evidence availability.Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
ea6d2b039fℹ️ About Codex in GitHub
Your 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".
In the
Discover schematics and PCBsstep of.github/workflows/kicad-exports.yml, the new ignore glob uses*.kicad_block/*(singular) instead of*/kicad_blocks/*, so schematics insidekicad_blocks/are no longer excluded. On repos that vendor reusable block libraries there, ERC will run on those library sources and can produce false failures/noise that block the export lane.Useful? React with 👍 / 👎.
@@ -0,0 +59,4 @@) -> dict[str, object]:comments_raw = github_request("GET",f"/repos/{repository}/issues/{pull_request_number}/comments?per_page=100",The sticky-comment updater only fetches
?per_page=100once before searching for<!-- yiacad-pr-summary -->. For PRs with more than 100 comments, the existing summary comment may be on a later page, so this path posts a new comment instead of updating the original one, breaking idempotent “single sticky summary” behavior.Useful? React with 👍 / 👎.
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.