Repository navigation
test(agent): pin the scheduled task card contract - ScheduledTaskCard - #2034
Conversation
Hold the one export of entrypoints/app/scheduled-tasks/ScheduledTaskCard.tsx against its contract (#1550), appended to the store suite by the same readdir rule as the blocks above: the card imports this suite's subject through useScheduledJobRuns, and the hook answers an empty run list in a static render, so the run history stays away and what is pinned is the card frame - the switch on and off with its Disable/Enable labels, the name and query, the daily, every-N-hours, every-minute and unset schedule lines, the Disabled badge, the Test and Edit buttons with the delete behind its label, and the last-run line in relative words - plus the run-history rows, their icon gating, the cancel/retry controls behind their aria-labels, the View action and the switch label as source checks. Closes #1550 Dmitrii Fedorov ([@dmitrii-f-t27](https://github.com/dmitrii-f-t27))
Summary by t27-beesThe PR adds contract tests for Worth a look
Read: 1 files, +116 -0, the whole diff. Head |
β Tests passed β 3886/3956
|
β¦er lesson The first draft rendered the card, and the CI order taught the hard way bun links and runs test files one by one: whichever order the two files meet in, a card import from this suite materializes the llm-providers store first (or replaces it) and poisons the lib/llm-providers suite's defineItem pins - measured both directions. The card's graph reaches that store, so the contract is now held as source checks alone, importing nothing: no render, no new global stand-ins, order-proof in both directions. Dmitrii Fedorov ([@dmitrii-f-t27](https://github.com/dmitrii-f-t27))
Summary
Hold the one export of
trios/agent-server/apps/agent/entrypoints/app/scheduled-tasks/ScheduledTaskCard.tsxβScheduledTaskCardβ against its contract (#1550), so the next change to that file has something to fail against.The block is appended to
lib/schedules/scheduleStorage.test.tsby the same readdir rule that file documents for the #1634 and #1580 blocks: the card imports the store suite's subject throughuseScheduledJobRuns, whose module that file already materialized real behind its own stand-ins.The card is held as a full source contract, no render β and the first CI run of this PR is the measured reason: the card's graph also reaches the llm-providers store, whose own suite (
lib/llm-providers/storage.test.ts) pins thedefineIteminterception of its own storage seam, recorded at that module's first materialization. Bun links and runs test files one by one, so whichever order the two files meet in, a card import from this suite materializes that store first (or replaces it) and poisons the llm-providers suite's pins β measured both directions (the first run failedTests / agentwith exactly that suite's nine pins). The source-contract block imports nothing: no render, no new global stand-ins, order-proof in both directions.What is pinned:
Disable/Enablelabel template, the name and quoted query, and theDisabledbadge gated on the disabled flag;Daily at,Every hour,Every N hours,Every minute,Every N minutes,Not scheduled) and the durations through the running note and the minute-second split;Verification
bun test lib/schedules/scheduleStorage.test.tsβ 41 pass, 0 fail (4 new tests).git checkout.lib/schedules/+entrypoints/app/scheduled-tasks/+lib/llm-providers/): 79 pass, 0 fail each way β the llm-providers suite stays green with this block in either link order.biome cion the suite file: clean, no findings.tsgo --noEmit: 0 mentions of the suite file.Closes #1550
Dmitrii Fedorov (@dmitrii-f-t27)