Skip to content

test(pm-stack): cover remaining #1213 gaps - #4011

Merged
dezren39 merged 4 commits into
mainfrom
queue/4935-1213-test-gaps
Nov 2, 2026
Merged

dezren39 merged 4 commits into
mainfrom
queue/4935-1213-test-gaps

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add stubbed-fetch coverage for live Grist roadmap mapping, bearer auth, and 503 fixture fallback/provenance.
  • Add isolated Grist/Pad seed idempotency tests plus render/install smoke checks under temporary directories and HOME.
  • Add a path-filtered CI gate for the aggregator and projector Bun suites and the shell harnesses. Add the projector Bun lockfile so CI can use frozen installs.

Evidence

  • Before: the Grist live reader, seed idempotency, deploy/install smoke paths, and combined PM stack CI gate were uncovered.
  • After: bun test test/grist-live.test.ts — 2 passed; pm-stack/projector bun test — 53 passed; both shell smoke harnesses passed, including no second-run POSTs for Grist and Pad.
  • pm-stack/aggregator bun test — 930 passed, 1 failed at test/slice3.test.ts:506 (missing claude-code registry record). The identical failure reproduces on a clean export of origin/main b5fc3f069213ffc4ca24cea5759b039b5dad37ec (bun test test/slice3.test.ts: 23 passed, 1 failed); it is unrelated to this test-only change and is not modified here.
  • Local actionlint is unavailable; the new workflow will be checked by GitHub Actions.

Merge Danger

Door: two-way — tests and CI configuration only, straightforward to revert.

Blast Radius: CI — enables the PM stack suites and isolated script checks on PM stack changes; no production behavior changes.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 22:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 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-02T08:50:03.919702Z 2f9ef0e New commits
ℹ️ 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.

@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 38eba42b-b1f9-43fd-8fd7-0d5201e1a18e
Commits

Reviewing files that changed from the base of the PR and between d6bcc30 and 2f9ef0e.

Files ignored due to path filters: 1
  • pm-stack/projector/bun.lock is excluded by !**/*.lock
Files selected for processing: 6
  • .github/workflows/pm-stack-tests.yml
  • pm-stack/aggregator/src/sources/fixtures.ts
  • pm-stack/aggregator/test/grist-live.test.ts
  • pm-stack/aggregator/test/slice3.test.ts
  • pm-stack/scripts/deploy-install-smoke.test.sh
  • pm-stack/scripts/seed-smoke.test.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e9a0796e5

ℹ️ 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".

Comment on lines +32 to +34
- name: Test aggregator
working-directory: pm-stack/aggregator
run: bun test

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fix the dated registry assertion before gating on the full suite

On a clean CI runner, this newly added step encounters the existing failure in test/slice3.test.ts:506: the test requests /api/registry.json with its default seven-day window but expects the sole claude-code fixture, whose last activity is fixed at 2026-10-25T14:31:00Z. That record is already outside the window at this commit's timestamp; directly evaluating the registry query confirms it is excluded. Consequently, the new workflow reports failure on otherwise unrelated PM-stack changes and skips the subsequent projector and shell-smoke steps. Make the assertion independent of wall-clock time before enabling this gate, for example by requesting all registry history in that test.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in commit 2296432, exactly along the suggested line: the slice-3 registry assertion now requests /api/registry.json?window=all, so the fixed-date claude-code fixture (last activity 2026-10-25) can no longer age out of the default 7-day window.

The same run exposed a second fixed-date time-bomb of the same class, also fixed in 2296432: the turso fixture history in src/sources/fixtures.ts paired relative daysAgo() snapshot dates with a hard-coded resetsAt of 2026-10-31; once that date passed, windowStartIndex collapsed the pace window to a single point and the service-detail view lost its Pace projections section (hub renders > service detail failure). The fixture reset is now future-dated relative to the snapshots.

— queue worker, task 4935

)

main commit c515c9d made ready-for-agent/install.sh prove a fresh process start via ExecMainStartTimestampMonotonic and changed its success line; the CI merge checkout therefore failed the two ready-for-agent checks (the systemctl stub returned no timestamp). The stub now keeps a start-timestamp state file that restart bumps, and the assertion matches the new running-after-restart line. Both shell harnesses pass locally; grist-live + slice3 bun tests 28/28 pass.
@dezren39

dezren39 commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

Resumed by task 4935 (lane E). Two changes at head 2f9ef0ed4:

  1. Merged current main into the branch. CI's merge checkout was testing this PR's harness against main's newer ready-for-agent/install.sh (commit c515c9d33: restart-after-install proven via ExecMainStartTimestampMonotonic, new success line) — that mismatch, not the PR's own code, failed the two ready-for-agent checks in the new gate.
  2. Harness fix: the systemctl stub in deploy-install-smoke.test.sh now models the start timestamp (state file bumped on restart), and the assertion matches the new is running after restart success line.

Verified on the laptop at this head: seed-smoke.test.sh all checks passed; deploy-install-smoke.test.sh all checks passed; bun test test/grist-live.test.ts test/slice3.test.ts — 28 pass, 0 fail.

The remaining red check, aggregator Typecheck, is the pre-existing main baseline tracked in #4023: bunx tsc --noEmit here reports exactly 12 errors, all in main-side files (src/projects.ts, src/push.ts, test/charges-collect|feed|github-billing|overview|projects|quota-current) and none in any file this PR touches. Not fixed here per the packet's scope; it does not block this test-only change.

@dezren39
dezren39 merged commit cc819fe into main Nov 2, 2026
1 of 3 checks passed
@dezren39
dezren39 deleted the queue/4935-1213-test-gaps branch November 2, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant