Repository navigation
fix(cli): 0.10.12 — status, doctor and verify keep an older denial visible as dated history (port of staging #48) - #1943
Merged
Merged
Conversation
…ated history (red) Port of jonathan308/d-inference-pr-staging#48's CLI tests onto dev (issue #1163). A provider's last coordinator authorization report is shown only while it is at most 10 s old (snapshotMaxAge); dev keeps an unexpired App Attest lease past that (displayedStatus), but an older `none` (a denial) or `legacy` report still disappears from status, doctor and verify, so a denied Mac can look healthy. - agedReportKeepsAttestationLookup and agedReportNeverReplacesPublicProof expect a "last reported authorization" row (INFO for legacy, WARN for none) beside the public attestation checks, which still run: they fail on dev, which prints no such row. - verifyAgedReports expects verify to print that row and to fail only on a WARN or FAIL: it fails on dev. - agedReportGuards pins what stays withheld (pre-start receipts, a stale snapshot, another coordinator) and, adapted to dev, that an aged App Attest decision is never history: an unexpired lease is still the serving authorization row (dev's displayedStatus), and an expired one is shown nowhere. It passes on dev and must keep passing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rt as dated history Port of jonathan308/d-inference-pr-staging#48 onto dev, for 0.10.12 (issue #1163), adapted to dev's displayedStatus, which already keeps an unexpired App Attest lease visible past snapshotMaxAge. - ProviderAuthorizationReadiness.lastReportedStatus: only where displayedStatus shows nothing, an older `none` or `legacy` decision from the live process and the expected coordinator. Built on dev's liveDecision, so every guard but the receipt's age stays: the snapshot write within 10 s, process and coordinator identity, online, protocol 1, a receipt after the process started and at most 2 s ahead. An older app_attest or an unknown path is never history. lastReportedSummary prefixes the age and "not a fresh dispatch grant" to the summary. DaemonState gains lastReportedProviderAuthorization, beside displayedProviderAuthorization. - status prints "Last reported authorization: …" before its trust line; doctor's diagnosis and its coordinator checks, and verify, print "last reported authorization", INFO for legacy and WARN for none, and the trust and public attestation checks still run after it. - verify exits non-zero on a WARN or FAIL (isFailure(strict: true)), not on INFO; no other check is INFO, so only the new legacy line is affected. - provider-authorization.md and cli-reference.md say so; changelog.d/authorization-history.md. Tests: the CLI tests of the previous commit fail on dev and pass here; ProviderAuthorizationReadinessTests gains nine tests of the new API (history only for none and legacy, never for a displayed decision or an aged App Attest one, and every guard). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… second guard Independent refactor pass of this port (#1943). No behavior change. - `buildCoordinatorDoctorChecks` asked for the last reported authorization only when no current decision was shown (`authorization == nil ? … : nil`). `lastReportedStatus` already returns nil whenever `displayedStatus` shows one, and the row is used only below the current decision's early return, so the call stays beside the other two decisions from the same snapshot and time, without the ternary. - `lastReportedPaths` is private: only this file reads it. Local (Xcode 27.2, CPU sandbox): ProviderAuthorizationReadinessTests 23, DoctorCommandRunTests 14, DoctorOperatorDiagnosisTests and StatusCommandRunTests 11: pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 9, 2026
Merged
…report as dated history The independent review found that two of the four display sites had no test: with the `status` block and `DoctorRunner`'s trust-section block both removed, all 25 status and doctor tests still passed. - `StatusCommandRunTests.agedReportIsDatedHistory`: an aged legacy and an aged none report each print `Last reported authorization: received 10m ago; …` right before `Trust: self_signed / online`, and no `Authorization:` line; the same legacy report received just now prints `Authorization: …` and no history. - `DoctorOperatorDiagnosisTests.agedReportIsTrustHistory`: the diagnosis has a `last reported authorization` row in the trust section (INFO for legacy, WARN for none, the exact text, no fix) before `trust level`, and no `serving authorization`; received just now, it is the serving authorization. Both reuse `DoctorCommandRunTests`' report fixtures. The diagnosis case runs without hardware, so no GPU capability probe starts. Local (Xcode 27.2, CPU sandbox): StatusCommandRunTests 7, DoctorOperatorDiagnosisTests 6, DoctorCommandRunTests 14: pass. With both blocks removed, exactly the two new tests fail (3 issues); every other test passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jonathan308
marked this pull request as ready for review
November 10, 2026 00:38
This was referenced Nov 10, 2026
This was referenced Nov 12, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue #1163: a legacy-verified provider fell to authorization path
noneand got no requests while every diagnosticsaid it was healthy.
darkbloom status,doctorandverifyshow the coordinator's last authorization only whileit is at most 10 s old (
snapshotMaxAge). Dev already keeps an unexpired App Attest lease visible past that(
displayedStatus), but an oldernone(a denial) orlegacyreport still vanishes, so a denied Mac can look healthy.This keeps such a report visible as dated history, never as a grant:
status:Last reported authorization: received 10m ago; not a fresh dispatch grant. <summary>;doctorandverify: alast reported authorizationline, INFO forlegacyand WARN fornone, and thetrust and public attestation checks still run after it;
verifynow fails on a WARN or FAIL line, not on INFO (no other check is INFO).Before
flowchart LR A["Running daemon, fresh snapshot, none or legacy report received 10 min ago"] --> B{"displayedStatus: receipt within 10 s, or an unexpired App Attest lease?"} B -- no --> C["status, doctor and verify: no authorization line"] C --> D["a denied Mac looks healthy"] classDef bad fill:#fee2e2,stroke:#b91c1c,color:#7f1d1d class C,D badAfter
flowchart LR A["Running daemon, fresh snapshot, none or legacy report received 10 min ago"] --> B{"displayedStatus shows a decision?"} B -- yes --> C["serving authorization, as before"] B -- no --> E{"lastReportedStatus: same guards except the receipt age; path none or legacy?"} E -- yes --> F["Last reported authorization: received 10m ago; not a fresh dispatch grant"] F --> G["legacy INFO, none WARN; trust and public proof checks still run"] E -- "no: app_attest, unknown path, stale snapshot, other process or coordinator" --> H["nothing, as before"] classDef good fill:#dcfce7,stroke:#15803d,color:#14532d class F,G goodCode flow:
ProviderAuthorizationReadiness.lastReportedStatusreturns a decision only wheredisplayedStatusreturnsnil, through dev's
liveDecision(snapshot write ≤ 10 s, process and coordinator identity,online, protocol 1, areceipt after the process start and ≤ 2 s ahead), and only for
none/legacy.DaemonState.lastReportedProviderAuthorizationbinds it to the snapshot like
displayedProviderAuthorization. Callers:StatusCommand(before the trust line),DoctorRunner.networkDiagnosis(trust section),buildCoordinatorDoctorChecks(after the health check), andVerify(isFailure(strict: true)).Linked issue
Refs #1163 (diagnostic visibility only: not the serving failures, console labels or routing eligibility). Original:
jonathan308/d-inference-pr-staging#48 (private).
Test plan
09cc7be565) on dev0f11fbe01a:agedReportKeepsAttestationLookup,agedReportNeverReplacesPublicProofandverifyAgedReportsmust fail there (nohistory row);
agedReportGuardsmust pass on both. CI (dev) run 42679834358 on the red commit: failed exactlythere, 16 issues in those three tests;
agedReportGuardsand the other 1,079 tests of that shard passed.008ae270dd: success (both shards).ProviderAuthorizationReadinessTestsgains nine tests of the new API.
DoctorCommandRunTests14,ProviderAuthorizationReadinessTests23,DoctorOperatorDiagnosisTests5: pass.make docs-check(211 files),docs-impact-check --base dev(10 files),changelog check,git diff --check: pass.08e7bca7b9), local:ProviderAuthorizationReadinessTests23,DoctorCommandRunTests14,DoctorOperatorDiagnosisTests|StatusCommandRunTests11: pass. CI (dev) run 42707261438 on08e7bca7b9:success.
b58b276f4f):StatusCommandRunTests.agedReportIsDatedHistory(an aged legacy and an agednone report print
Last reported authorization: received 10m ago; …right before the trust line, and noAuthorization:; received just now,Authorization:and no history) andDoctorOperatorDiagnosisTests.agedReportIsTrustHistory(the trust section'slast reported authorizationrow, INFO orWARN with the exact text, before
trust level, neverserving authorization). Local:StatusCommandRunTests7,DoctorOperatorDiagnosisTests6,DoctorCommandRunTests14: pass; with both blocks removed, exactly the two new testsfail. CI (dev) run 42727580142 on
b58b276f4f: success.Adapted from the original:
diagnosticStatusreturned the strict result when there was one; herelastReportedStatusreturnsonly history, and the callers keep dev's
displayedStatusfor the current decision.agedReportGuards: on dev an aged App Attest decision with an unexpired lease is still the serving authorization row(dev's rule), so the test pins that, and adds an expired lease, which is shown nowhere.
Components touched
Protocol / interface changes
verify's exit code changes only for the new INFO line.Documentation impact
docs/reference/provider-authorization.md(history, a table of where it shows),docs/provider/cli-reference.md;changelog.d/authorization-history.md.Refactor pass
The original had independent design and refactor reviews. The port's independent refactor pass (2026-11-09,
08e7bca7b9): the adaptation ontoliveDecision/displayedStatusis correct (fornone/legacythe two are disjoint,so no row shows twice; history never offers removal; the only INFO row
verifycan print is the new one). Cleanups:buildCoordinatorDoctorChecksdrops anauthorization == nil ?guard thatlastReportedStatusalready guarantees(the call stays beside the other two decisions from the same snapshot and time), and
lastReportedPathsis private.Left as is: the private
ageDescription(it guards non-finite ages thatDurationFormatting.compactwould trap on) andthe legacy-INFO / none-WARN mapping in doctor's two sections (as dev's "serving authorization" level).
AI usage: ported by Claude Opus 5.5 (S-DINF sweep) at the owner's request. Not for merge until reviewed.