Repository navigation
test(apps): declare permissions.cron in the cron timeout manifest fixture - #19307
chenmingwei23 wants to merge 1 commit into
Conversation
…ture The timeout tests build a manifest whose crons is non-empty, and AppManifest.validate refuses that manifest unless permissions declares the cron grant, so the three assertions that read validate() as empty read the missing-grant refusal instead. The fixture declares the grant, which is what an app shipping these crons must declare to install.
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 11a13c7 Description read[DESCRIPTION-READ] 95991a2e3b35469c7844cf38decc0c242647ee71d1547cc13bf566fb75d9a44a That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
|
Closing as superseded: #19280 landed the identical fix at 06:52:47Z, adding the same |
Problem / Motivation
Goal: make
maingreen again, so every open pull request stops failing a backend shard for a reason that has nothing to do with its own diff.Three cases in
test/test_app_cron_timeout_manifest.pyfail on an unmodifiedmain:Two changes landed eight minutes apart and the second was written against the shape the first had just retired.
b5cc2f3534(#19231) madepermissions.cronrequired whenever a manifest declarescrons, and fixed every fixture that existed at that moment.c469d966dd(#19191) then added this file, whose_manifesthelper builds a manifest withcronsand no such grant. So every assertion in those three cases reads the permission refusal instead of the timeout rule it was written to check.Why it matters
The failure is in backend shard 1, which every pull request runs, so a red
mainreads as a red PR. It cost real time tonight: a documentation-only pull request that changes two Markdown files carried this same failure and looked like its own fault until the test was run against a cleanmainin a detached worktree.It also hides what the file is for. These three cases exist to pin that a declared
timeoutandtimeout_secsreach the registered job. While the manifest is refused for an unrelated reason, they assert nothing about timeouts at all, so the rule they protect is currently unguarded.Not a goal
permissions.cronstays required;src/kiro_crew/apps/manifest.pyis untouched. The rule from fix(apps): require permissions.cron when a manifest declares crons #19231 is correct and this change makes the fixture satisfy it.validate() == []stays exactly as written. Nothing is changed to "not empty", skipped, or marked expected-failure.What changed (motivation -> approach -> change)
The rule is right and the fixture is stale, so the fixture is what moves.
_manifestnow declares"permissions": {"cron": True}alongside thecronsentry it already carried, which makes it the "otherwise valid manifest that schedules this cron" its callers assume. A docstring says why that grant is part of being valid here, so the next reader does not take it for incidental boilerplate and drop it.Every other case in the file was checked for the same shape; the cases that build a manifest through other helpers already satisfy the rule, so
_manifestis the only one that needed the grant.Tests
Run with a scratch
KIROCREW_HOME, because the suite refuses to run against the live data home:Neighbouring app-manifest tests, to show the grant did not disturb anything that reads the same manifest shape:
Gates, run with the repository's own venv binaries:
Manual verification: reproduced the failure first on a detached worktree at unmodified
origin/mainbefore touching anything, so the fix is measured against a known-red baseline rather than against a working tree.Backwards compatibility
Nothing to break. The diff is one test file. No wire contract, route, tool, field, default or public function is added, renamed, or removed, and no manifest a user wrote is affected: the grant is added to a fixture, not to a validation path. A manifest in the wild that declares
cronswithoutpermissions.cronis refused exactly as #19231 decided it should be.Related Issues
Fixes the
mainbreakage introduced between #19231 and #19191. Unblocks backend shard 1 on every open pull request, including #19287 and #19292, which both carry this failure.Checklist