fix(#320): SchedulePanel kind-match filter + taskStore type alignment#383
fix(#320): SchedulePanel kind-match filter + taskStore type alignment#383
Conversation
|
@codex review Please review latest commit 28f21da for P1/P2 only. 规则:任何 P1/P2 必须给"可执行复现":
审查标准(详见 AGENTS.md "Review guidelines" section):
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28f21da122
ℹ️ 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".
|
@codex review Please review latest commit 7a2457e for P1/P2 only. P1 fix applied: kind-match path now scrubs lastRun/subjectPreview to prevent cross-thread metadata leak. Test updated with scrub assertions. 规则:任何 P1/P2 必须给"可执行复现":
审查标准(详见 AGENTS.md "Review guidelines" section):
|
|
Codex Review: Didn't find any major issues. Swish! ℹ️ 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". |
7a2457e to
6f9ad98
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f9ad9825a
ℹ️ 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".
876140b to
8d97b09
Compare
|
@codex review Please review latest commit 8d97b09 for P1/P2 only. 规则:任何 P1/P2 必须给"可执行复现":
审查标准(详见 AGENTS.md "Review guidelines" section):
|
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ 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". |
8d97b09 to
2ed7243
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The zero-run path in schedule.ts only showed PR scheduler tasks (cicd-check, conflict-check, review-feedback) when the task had NEVER run. Since builtin tasks have prior runs for other PRs, newly registered PR tracking never appeared in the SchedulePanel. Fix: drop the !s.lastRun condition so threads with active pr_tracking tasks see PR-related scheduler tasks via subjectKind match. Also: taskStore.ts imports TaskItem from @cat-cafe/shared instead of maintaining a stale local copy (missing kind/subjectKey/automationState). Split from PR #379 per upstream review — TaskPanel changes dropped to align with cat-cafe #958 direction (filter pr_tracking out of TaskPanel). [宪宪/Opus-46🐾] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a task is included via subjectKind match (not actual run match), its lastRun and subjectPreview belong to a different thread/PR. Returning them leaks cross-thread metadata. Fix: kind-match path returns a scrubbed copy with lastRun and subjectPreview set to null. Quick/slow paths (actual matches) are unchanged. [宪宪/Opus-46🐾] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Kind-match path already zeroed lastRun/subjectPreview but left runStats from unrelated subjects intact, leaking cross-thread activity totals (e.g. nonzero delivered count for a brand-new PR tracking thread). Now resets runStats to all zeros. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
85d9dde to
2f7c4dc
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zts212653
left a comment
There was a problem hiding this comment.
LGTM — clean scope, good scrubbing approach.
Reviewed by both Ragdoll (opus) and Maine Coon (gpt52). No P1/P2 findings.
Key validations:
- kind-match fix correctly removes !s.lastRun gate
- flatMap + destructure scrub prevents cross-thread metadata leak
- Test coverage solid: inclusion + scrub assertions + negative case
- taskStore type alignment with shared is cleaner than local definition
Will proceed with merge + intake to cat-cafe.
— Ragdoll-opus
What
packages/api/src/routes/schedule.ts: Remove!s.lastRungate on kind-match filter pathpackages/api/test/schedule-route.test.js: Fix test asserting buggy behavior + add negative testpackages/web/src/stores/taskStore.ts: Import TaskItem from @cat-cafe/shared (type alignment)Why
PR #323 added a kind-match filter in the SchedulePanel's thread-scoped view, but gated it with
!s.lastRun. Builtin scheduler tasks (cicd-check, conflict-check, review-feedback) have prior runs for other PRs, sos.lastRunis always truthy — newly registered PR tracking tasks never appeared in the SchedulePanel.Original Requirements
Plan / ADR
Tradeoff
Removed
!s.lastRunon kind-match path. Tasks included via kind-match may showlastRunfrom a different PR — acknowledged as P2 follow-up (run state scrubbing for thread scope).Test Evidence
Schedule route tests: 26 passed, 0 failed
Build: success
Biome check: 0 errors on changed files
Open Questions
None — scoped to SchedulePanel fix only.
Local Review: [x] gpt52 reviewed and approved (on original PR #379)
Cloud Review: [ ] Triggering in comment below