Repository navigation
fix(aggregator): generatedAt parse + 60s future-skew gates (#1564) - #1693
Conversation
|
Warning Review limit reachedYou'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. View limit details
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76b03ff89e
ℹ️ 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".
| if (parsedAt - now > GENERATED_AT_FUTURE_SKEW_MS) { | ||
| return { state: "invalid", failedChecks: ["generatedAt"], generatedAt: s.generatedAt, runId: s.runId }; |
There was a problem hiding this comment.
Enforce the future-skew rejection when serving the section
For an otherwise valid section stamped more than 60 seconds ahead, this returns invalid, but normalizeOrchestrationSection() still accepts it and liveSource.orchestration() returns it with live provenance. This introduces contradictory behavior: buildAttention() marks the tier source absent/invalid while still including its published queue items, so /attention claims it is showing session-derived items only even though rejected section items remain. deriveToday() also consumes the section, and /today displays its measurements without an invalid-state warning. Make the serving path reject sections that fail this temporal gate so the new diagnosis and the displayed data remain consistent.
Useful? React with 👍 / 👎.
Implements the triage ruling on #1564 (task 1830, following the draft patch prepared by Lane D):
feed.ts: exportGENERATED_AT_FUTURE_SKEW_MS = 60_000(the aggregator-wide 60s convention from aggregator: a future-dated gatherer read is 'fresh' forever until its date passes — quota-current freshness has no upper bound, so one skewed measuredAt pins a pool's windows for weeks #1541);orchestrationSectionProblemnow requiresgeneratedAtto parse;diagnoseOrchestrationSectiondiagnoses a >60s-future section as invalid withfailedChecks: ["generatedAt"](never live);isFleetFeedrejects unparseable stamps;ageMsTextrendersunknownfor non-finite ages (NaNd oldunreachable).health.ts: a feed stamped >60s in the future reports the fleet-feed probe as stale/not-ok with a detail naming the future stamp — never up/fresh.orchestration.test.ts, future-feed case inhealth.test.ts.ORCHESTRATION_STALE_MSandFEED_STALE_MSunchanged; no quota-current or snapshot changes.Laptop verification: orchestration+health suites 37/37 pass; full aggregator suite 313 pass with 1 pre-existing failure in
actions.test.ts(verified identical on clean main via stash).Closes #1564
Need help on this PR? Tag
@codesmith-botwith what you need.