chore(ci): DRY release.yml + size-limit PR comment#76
Conversation
Replace the inlined format/lint/typecheck/test/build steps in release.yml with a single `npm run verify` call so future verify changes auto-propagate. Verify also runs typedoc, gaining the release pipeline a docs-generation safety net. Add an `andresz1/size-limit-action` job to PR CI that posts a sticky comment with the gzip delta for each of the 5 budgets in package.json#size-limit. Job runs only on `pull_request` events and needs `pull-requests: write`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
size-limit report 📦
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93a03b3207
ℹ️ 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".
Per Codex review, two fixes: 1. Drop workflow-level `pull-requests: write`. Only the `size-limit-comment` job needs PR write; granting it at workflow scope expanded the GITHUB_TOKEN's blast radius across every parallel job. Job-level permissions already carry the write grant on the one job that posts the comment. 2. Drop `needs: build` from `size-limit-comment`. `build` runs `npx size-limit` and fails when budgets are exceeded — exactly the regression case where the sticky delta comment is most useful. Without `needs`, the comment posts regardless and the reviewer sees the offending bytes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec20f83a77
ℹ️ 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".
Per Codex review (P1): the `script` override to `andresz1/size-limit-action` was `size-limit --json`, which assumes the binary is on PATH. On GitHub-hosted runners the binary lives only in `node_modules/.bin`, so the action would fail with command-not-found before posting the sticky delta comment. Restore `npx` so the action's documented default behavior holds. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9ec83749a
ℹ️ 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".
Two fixes from Codex's third review: 1. P1 — actionlint job uses `reviewdog/action-actionlint` with `reporter: github-check`, which writes through the Checks API. The previous workflow-level `contents: read` change stripped `checks: write` from every job, including this one. Restore `checks: write` at the actionlint job's permissions block so the check reporter can post normally. 2. P2 — size-limit-comment was decoupled from `build` to ensure the delta comment posts when the size budget fails. Reconcile by restoring `needs: build` for ordering but using `if: always() && needs.build.result != 'cancelled' && != 'skipped'` so the comment still fires when build's `npx size-limit` step fails. Avoids parallel install/build duplication while keeping the regression-feedback property intact. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ 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". |
…pdate (#85) * feat(llm,docs): MockLlmProvider example + README LLM section + plan update - examples/llm-mock/: minimal Node example (index.ts + package.json + README.md). MockLlmProvider → tiny LlmReasoner → createAgent under SeededRng + ManualClock for 5 ticks; re-runs and asserts byte-identical DecisionTrace[] across runs. Demonstrates the LlmProviderPort end-to-end without network or a real provider key. - README.md: new "LLM provider port (preview)" section between reactive-store binding and Development. Five-line MockLlmProvider snippet, links to the example, calls out Phase B for concrete Anthropic/OpenAI adapters. - docs/specs/vision.md: one-paragraph status note under P3 — port + mock ship in 1.0; concrete adapters Phase B. - docs/plans/2026-04-25-comprehensive-polish-and-harden.md: new "Track B" section under "What's already shipped" listing PRs #76 through #85 with their roadmap row mapping. Workflow section gets a sixth rule pinning plan/doc updates to the same PR that lands the work. - CLAUDE.md (Plans & specs section): same plan-rides-with-PR rule inline, with rationale (stale plans force second review cycles + degrade Codex review quality). Roadmap row 15. No library code change. No changeset (docs + example only). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(example): drop parameter property in llm-mock for strip-types compat Per Codex review (P1): the LlmReasoner constructor used a TypeScript parameter property (`constructor(private readonly provider: ...)`), which Node's `--experimental-strip-types` mode (the runtime the example uses via `npm run start`) cannot parse. The example failed immediately with `ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX` before any determinism logic ran. Replace with a manual field declaration + body assignment. Visibility modifiers on regular methods (`private async runAsync`) stay — those ARE strippable in place, only parameter properties require an actual transformation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(example): pre-compute LLM decisions to remove shared-state hazard Per Codex review (P2): the original example wired `provider.complete` inside `selectIntention` and stored the result in a module-scoped `lastDecision` variable. Run B reused the same slot — a stale write from run A's pending completion could land while run B was already ticking, masking real determinism violations. Restructure the example to pre-compute one decision per tick by awaiting `provider.complete` sequentially BEFORE the run starts. A new sync `ScriptedReasoner` then walks the pre-computed list with a private cursor. No shared state, no late writes from prior runs, and the example now actually demonstrates determinism rather than coincidentally passing. `runOnce()` now constructs both the provider AND the reasoner per call — the second run is a clean replay from a fresh provider with identical scripts, exactly as the example claims. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(example): only swallow queue-exhausted errors in precomputeDecisions Per Codex review (P2): the bare `catch` masked every `provider.complete(...)` failure as queue exhaustion, so a real regression — budget enforcement change, malformed-request handling, runtime error in a future adapter — would silently downgrade to `''` and the example would still print success. That defeats the example's job as a smoke test for the LLM port. Narrow the catch via an `isQueueExhausted(err)` predicate that matches on `MockLlmProvider`'s documented error message ("script queue exhausted"). Anything else rethrows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Luis Mendez <hallo@luis-mendez.de> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary
Doc-audit pass over `docs/plans` + `docs/specs`. Three things land
together:
- **`docs/archive/{plans,specs}/`** — new home for plans whose roadmap
rows have all shipped (or whose goals were folded into a successor)
and specs whose design is now reflected in code. Includes a
`README.md` explaining the policy; `CLAUDE.md` documents the
convention.
- **`git mv` 23 plans + 3 specs into the archive.** The active live
set is now the comprehensive polish-and-harden plan plus three
specs (post-tfjs improvements, mvp-demo, vision), each with a
refreshed status banner.
- **Refresh the live comprehensive plan** against current `develop`:
- PR column updated for rows 16/19/20/3/4/22 (now shipped via
PRs #91 / #98 / #104 / #110 / #113 / #111).
- New "Post-roadmap follow-ups" section covers PRs #92 → #125
(review-bot infra, tracker findings, demo + tfjs hotfixes,
tooling).
- Stale prose-baked counts dropped (size budgets now reference
`package.json#size-limit` only).
- Coverage-thresholds section gains a pointer to the sticky PR
comment shipped in PR #124.
## Other doc fixes
- `README.md`: drop the unverifiable "Phase A milestones (M0–M15) are
all green" claim — the milestones don't exist as documented IDs
anywhere; replace with a pointer to the live polish plan.
- `vision.md`: refresh cadence note (was pinned to 2026-04-19 + "next
review at 1.0").
- `2026-04-24-post-tfjs-improvements.md`: mark recommended-order items
that have shipped (PRs #61, #76, #77, #83, #84, #91, #94, #96,
#104, #113), link the active roadmap as the heir.
- `mvp-demo.md`: status banner explaining where active polish work is
now tracked.
## Mechanical
- Update inline cross-refs in `CLAUDE.md`, `eslint.config.js`,
`src/agent/{Agent,AgentModule}.ts`, `tests/unit/exports.test.ts`,
and `docs/daily-reviews/2026-04-25.md` to point at the new
`docs/archive/` paths so links keep resolving.
No code change beyond comment-path updates.
## Test plan
- [x] `npm run verify` green (`format:check` + `lint` + `typecheck` +
`test` + `build` + `docs`). 523 tests pass; the 2 lint warnings
are pre-existing (`CognitionPipeline.invokeSkillAction` complexity
+ `scoreFailure` param count) and on the ratchet menu.
- [x] `git ls-files docs/archive/` shows the moved files; renames are
preserved (`git log --follow` works for any moved file).
- [ ] Codex review: clean, no blockers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Luis Mendez <hallo@luis-mendez.de>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
.github/workflows/release.ymlwith a singlenpm run verifycall. Future verify changes auto-propagate; release also gains thedocs(typedoc) safety net.andresz1/size-limit-actionjob to PR CI. Posts a sticky comment with the gzip delta for each of the 5 budgets inpackage.json#size-limit(main 50 KB, integrations 2 KB each, tfjs 7 KB).permissions: pull-requests: writeso the bot can comment.Roadmap row 1 of
docs/plans/2026-04-25-comprehensive-polish-and-harden.md.Test plan
npm run verifygreen locally.main.Notes for review
size-limit-commentjob runs only onpull_requestevents (uses base ref to compute delta).buildso it shares the artifact ordering with the existingEnforce bundle-size budgetstep rather than racing with it.🤖 Generated with Claude Code