GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(pm-stack): add pm-core scheduler seam for quota and feed jobs by dezren39 · Pull Request #12905 · developing-today/code Conversation
|
|
Caution Review failedThe pull request is closed. Walkthrough
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis 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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 2006080757
Your 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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| start() { | ||
| if (timers.size > 0) return; | ||
| for (const job of Object.keys(jobs) as SchedulerJobName[]) { | ||
| timers.set(job, setTimer(() => void runNow(job), cadence[job])); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Handle audit-write failures in scheduled callbacks
If writeAudit rejects because its destination is unavailable or full, runNow catches the initial failure but then awaits another write to the same failing sink, allowing that rejection to escape. The interval callback discards the returned promise without a rejection handler, so an audit-storage failure becomes an unhandled rejection in the hosting process instead of an isolated scheduler error. Handle audit failures separately and attach a rejection handler to timer-triggered runs so failure of the write-only audit sink cannot disrupt both jobs.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Lane LL shepherding this PR (it gates the next slice of #8570; claim also posted there). Addressing the unresolved Codex P2 finding: audit-write failures in the scheduled callbacks ( |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…nNow The scheduler's audit writes could reject into runNow: a failing audit sink after a successful job fell into the error path and awaited a second write to the same sink, and a failing error-path write rejected outright. The interval callback discards runNow's promise, so either escape became an unhandled rejection in the hosting process. Route both audit writes through a guarded helper: audit records are write-only artifacts, so a sink failure is swallowed by design and never masks the job's own outcome. Adds regression tests for a failing sink on the success path, on the error path, and through a timer tick. Refs #8570
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 8201a18e19
Your 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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| test("single-flights a job and writes success audit after it completes", async () => { | ||
| let release!: () => void; | ||
| let calls = 0; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Add property-based coverage for scheduler invariants
The scheduler introduces a stateful single-flight invariant, but the new tests cover only fixed examples, including one pair of overlapping quota calls. AGENTS.md requires “property tests ... where code has invariants,” and its linked testing doctrine explicitly includes state machines. Add generated sequences of timer ticks, runNow, start/stop, and job/audit settlement, using an invariant oracle that checks each job has at most one outstanding execution and that the two jobs remain independent. The existing examples can remain as smoke coverage, but do not satisfy this repository-specific requirement.
AGENTS.md reference: AGENTS.md:L36-L39
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Lane LL — shepherd complete: this PR is merged. Merge commit The unresolved Codex P2 finding is fixed in commit Verification at the merged head (laptop worktree):
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Verification from lane code-g (task 20173, #8570 Phase 3 slice 1): checked out PR head 8201a18 in a detached worktree and ran the evidence locally. bun test test/pm-core-scheduler.test.ts: 6 pass, 0 fail. bunx tsc --noEmit (after bun install): clean. Read-through: scheduler owns cadence + single-flight with injected timers/jobs, audit is write-only with failures swallowed by design and documented, both timer scripts keep CLI behavior behind import.meta.main guards while exporting main for in-process use. No changes to server, dispatch, tunnel, or Kaneo. From this lane: ready to merge; next slice (scheduler ownership wiring) waits on merge.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.