Skip to content

fix(pm-stack): close C7 rollup review gaps - #12504

Merged
dezren39 merged 5 commits into
mainfrom
queue/21001-12352-period-rollup
Nov 22, 2026
Merged

dezren39 merged 5 commits into
mainfrom
queue/21001-12352-period-rollup

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

 daily rerun / --as-of validation
+point-in-time source selection and activity filtering
+Friday-only reach-back and target-period scoping
+provenance/member-link separation
+higher-grain bubbling candidates

Follow-up to merged #12486; issue #12352 is already closed.

Evidence

  • Before: review findings allowed incorrect reruns, invalid --as-of to reach I/O, broader-than-Friday reach-back, conflated provenance/member links, and cross-period rollup leakage.
    After: 26 targeted tests pass; typecheck and git diff --check pass.

Merge Danger

Door: two-way

Blast Radius: low — aggregator rollup composition and persisted report records.


Run Proof
Open in [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 22, 2026 11:01
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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 commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T19:49:38.204701Z b3d1e06 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.

@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: 524bf3feac

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

@dezren39

Copy link
Copy Markdown
Member Author

Addressed the three Codex findings in 8006366:

  • Composed event blocks keep their original IDs and are deduplicated across child records; Friday reach-back copies no longer bubble upward.
  • Composed activity: summaries and template: blocks are excluded as source activity and regenerated at the target grain.
  • Classified members now appear only in their latest classification at or before asOf, with source-time and stable-ID tie-breaking; narrative blocks remain intact.

Verification: bun test test/report-composer-c7.test.ts test/report-periods-c7.test.ts (18 tests, 2,121 assertions), bunx tsc --noEmit, and git diff --check all pass.

felix added 2 commits November 22, 2026 19:40
# Conflicts:
#	pm-stack/aggregator/report-records-c7.md
#	pm-stack/aggregator/scripts/generate-report.ts
#	pm-stack/aggregator/src/report-composer.ts
#	pm-stack/aggregator/src/report-periods.ts
#	pm-stack/aggregator/src/report-records.ts
#	pm-stack/aggregator/test/report-composer-c7.test.ts
#	pm-stack/aggregator/test/report-periods-c7.test.ts
Shepherd pass for #12504: merged origin/main into the PR branch. The C7
feature had landed on main via #12486 as a token-identical copy of this
branch's feature commit, so the add/add conflicts resolved to this
branch's content (feature + review fixes); biome/prettier formatting
then restored main's treefmt style, leaving a net diff of exactly the
review-fix delta.
@dezren39

Copy link
Copy Markdown
Member Author

agent-note:v1
event: shepherded-ready-for-merge
by: agent felix (kind muse, Muse sandbox seat; queue task 21072)
at: 2026-11-22

Shepherd pass complete — this PR is ready for Felix's merge review.

Branch refreshed: merged origin/main (2ba5263) into the PR branch (merge commit 050db99) plus a treefmt commit (b3d1e06). The conflicts were add/add: the C7 feature had landed on main via #12486 as a token-identical copy of this branch's feature commit, and the only later main change to these files was the treefmt pass — so conflicts resolved to this branch's content (feature + review fixes) and biome/prettier formatting restored main's style. Net diff vs main is now exactly the review-fix delta: 5 files (report-composer.ts, report-records.ts, generate-report.ts, report-composer-c7.test.ts, report-records-c7.md). Main does not contain these fixes (no bubblingCandidates, no latest-classification resolution, no CLI --as-of period check), so the change is still desired, not superseded.

Review findings: all three Codex P2 threads are answered with evidence and resolved — (1) composed blocks keep original IDs, deduped across child records, reach-back copies no longer bubble; (2) composed activity:/template: blocks excluded as source activity and regenerated at the target grain; (3) members counted only in their latest classification at or before asOf. Codex's re-review at 8006366 reported no findings; CodeRabbit was rate-limited and produced no findings.

Verification (sandbox venue, refreshed head b3d1e06): C7 tests 29/29 pass (report-composer-c7, report-periods-c7, report-records-c7; 2,182 assertions); bunx tsc --noEmit clean; git diff --check clean. Full aggregator suite: the only failures are three tests (charges-feed-gate quota-view fallback, forecast deriveEpicEta, phase-mapping real-roadmap read) that fail identically at pristine origin/main in the same venue — pre-existing/environmental, none in the report modules this PR touches.

Merge state: MERGEABLE. No new dependencies.

@dezren39
dezren39 merged commit 1dd4c90 into main Nov 22, 2026
1 check failed
@dezren39
dezren39 deleted the queue/21001-12352-period-rollup branch November 22, 2026 19:47

@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: b3d1e06c10

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

expect(summaries).toHaveLength(1);
});

test("counts each linked member only in its latest classification as of the report time", () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Cover classification rollups with a generated reference model

The new latest-classification invariant is covered only by a hand-written two-transition example, with no property-based or model-based composer coverage for arbitrary transition histories, input permutations, or asOf cutoffs. The repository testing doctrine requires generated coverage for meaningful invariants and model-based tests where a specification exists; acceptance examples do not replace that coverage. Add generated histories checked against a latest-event-per-member reference model, naming that model as the oracle.

AGENTS.md reference: AGENTS.md:L37-L39

Useful? React with 👍 / 👎.

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