Repository navigation
fix(aws-control): state the baseline probe's payload kind so main type-checks - #12477
Conversation
…e-checks
`Backend Lint & Type Check (3.12)` is red on main and therefore on every open
PR:
backup.py:2526: error: Missing named argument "payload_kind" for
"_authorize_upload" [call-arg]
Two merges eleven seconds apart did it. #12190 (619c10f, 06:11:07Z) made
`payload_kind` a required keyword-only parameter; #12381 (4e8af7b,
06:11:18Z) added this call site without it. The second PR's CI ran against a
base where the parameter did not yet exist, so it merged textually clean and
semantically stale -- neither PR is wrong on its own.
The value is not a mypy silencer. The parameter's own docstring says `None` is
a real answer meaning this write carries no kind's payload, and the baseline
probe is a HEAD of an archive already in the bucket: it writes nothing, so no
per-kind grant governs it. Line 2413 states `None` at the comparable site.
Naming a kind here would be a behaviour change, not a cosmetic one: it would
subject a read to that kind's grant, so a withdrawn snapshot consent would
refuse the PROBE -- which this module answers by uploading, making the nightly
re-upload an unchanged tree every night, the exact cost the baseline exists to
avoid.
Nothing covered that. With the wrong kind passed, all 357 tests across the four
aws-control backup suites still passed, so the fix arrives with a regression
test on the assertion that was missing: the probe's authorization carries
`payload_kind is None`. Negative control fires -- `assert 'snapshot' is None`.
511 tests pass across five aws-control suites; mypy, black and flake8 are clean
on both touched files.
## Pattern harvest
Rule candidate: none for the typo class; the type checker already catches it,
and it did.
Not generalizable: the missing argument itself is a one-site omission.
The RECURRENCE is generalizable and is the third time this session has met it:
two PRs merged seconds apart, each green against a base that lacked the other,
combining into a break neither one contains. A required status check cannot see
it, because both were checked before the other existed. The candidate fix is a
merge-time re-check rather than a rule in any source file: re-run the type
check on the merge result when a PR's base moved after its last green, which is
the only moment the combination first exists.
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. [DESIGN-REVIEWED] 9f162cd |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (2 items) — 2 justifiedIntent: FIX — make main type-check again by supplying the required
Verified by reading: [FIRST-PRINCIPLES-REVIEWED] 9f162cd |
Opus 4.8 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: |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 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: |
Backend Lint & Type Check (3.12)is red on main and therefore on every openPR:
Two merges eleven seconds apart did it. #12190 (619c10f, 06:11:07Z) made
payload_kinda required keyword-only parameter; #12381 (4e8af7b,06:11:18Z) added this call site without it. The second PR's CI ran against a
base where the parameter did not yet exist, so it merged textually clean and
semantically stale -- neither PR is wrong on its own.
The value is not a mypy silencer. The parameter's own docstring says
Noneisa real answer meaning this write carries no kind's payload, and the baseline
probe is a HEAD of an archive already in the bucket: it writes nothing, so no
per-kind grant governs it. Line 2413 states
Noneat the comparable site.Naming a kind here would be a behaviour change, not a cosmetic one: it would
subject a read to that kind's grant, so a withdrawn snapshot consent would
refuse the PROBE -- which this module answers by uploading, making the nightly
re-upload an unchanged tree every night, the exact cost the baseline exists to
avoid.
Nothing covered that. With the wrong kind passed, all 357 tests across the four
aws-control backup suites still passed, so the fix arrives with a regression
test on the assertion that was missing: the probe's authorization carries
payload_kind is None. Negative control fires --assert 'snapshot' is None.511 tests pass across five aws-control suites; mypy, black and flake8 are clean
on both touched files.
Pattern harvest
Rule candidate: none for the typo class; the type checker already catches it,
and it did.
Not generalizable: the missing argument itself is a one-site omission.
The RECURRENCE is generalizable and is the third time this session has met it:
two PRs merged seconds apart, each green against a base that lacked the other,
combining into a break neither one contains. A required status check cannot see
it, because both were checked before the other existed. The candidate fix is a
merge-time re-check rather than a rule in any source file: re-run the type
check on the merge result when a PR's base moved after its last green, which is
the only moment the combination first exists.