Skip to content

fix(aws-control): state the baseline probe's payload kind so main type-checks - #12477

Merged
bolichen97 merged 1 commit into
mainfrom
fix/baseline-probe-payload-kind
Sep 21, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/baseline-probe-payload-kind

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

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.

…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.
@bolichen97
bolichen97 requested review from a team and patrigao September 21, 2026 06:54
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 9f162cd99e40b680a79218ce50d465a370c88a48 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Nothing to check.

[DESIGN-REVIEWED] 9f162cd

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of 9f162cd99e40b680a79218ce50d465a370c88a48 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (2 items) — 2 justified

Intent: FIX — make main type-check again by supplying the required payload_kind argument at the one call site that predated the parameter.

  1. The nightly baseline probe's authorization now states it carries no payload kind, so main's type check goes green — justified
  2. A test now pins that the probe's authorization passes no payload kind — justified

Verified by reading: payload_kind is keyword-only with no default (backup.py:1467) and its docstring names None as "a real answer, not an opt-out"; the probe is a HEAD via head_object_meta (backup.py:2534), writing nothing; the comparable site at backup.py:2413 already passes None. Grepped _authorize_upload\( — 7 call sites, every other one already passes payload_kind, so 0 unfixed siblings. The description names the out-of-scope root cause (two independently-green PRs merging seconds apart) and the level this fix sits at, as required.

[FIRST-PRINCIPLES-REVIEWED] 9f162cd

@github-actions

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 9f162cd99e40b680a79218ce50d465a370c88a48 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 9f162cd

Verdict parsed from the review's SHA-scoped output markers for commit 9f162cd99e40b680a79218ce50d465a370c88a48.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 9f162cd99e40b680a79218ce50d465a370c88a48: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 9f162cd99e40b680a79218ce50d465a370c88a48 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 9f162cd

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 9f162cd99e40b680a79218ce50d465a370c88a48: <one-sentence reason>

@bolichen97
bolichen97 merged commit 1dd5a03 into main Sep 21, 2026
89 of 90 checks passed
@bolichen97
bolichen97 deleted the fix/baseline-probe-payload-kind branch September 21, 2026 07:04
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant