Skip to content

Bug: qa admission refusals can surface no stage and appear transient; doctor does not diagnose admission #329

Open

Description

@barbatdev

Found while walking the #286 QA fleet end-to-end showcase.

During the walkthrough, identical qa run invocations (same binary, same catalog, same install root, unchanged install state) first failed instantly with actor_unavailable and no admission_stage diagnostic, then succeeded to launch on retry minutes later with no state change in between. The qaAdmissionDiagnostic path prints a stage only for AdmissionUnavailableError; the generic admissionInvalid() error (binding/shadow-root validation) surfaces nothing, and qa doctor does not probe QA admission at all.

Expected: admission refusals always name their stage (binding, shadow root, install state, fingerprint), and the transient case should be distinguishable from a persistent one.

Refs #286

Current disposition (maintainer accepted)

Keep the stage diagnostics shipped in #406, #407 and #410. Do not label a cause transient or persistent from a stage token or from one retry. The remaining investigation is a concrete, reproducible admission outcome change; it is not a request for automatic retries, repair, weaker guards, or real provider calls. The original report above is retained as history.

Bounded reproduction protocol

  1. Environment: use a disposable installation and canonical cwd, synthetic request/profile/guidance, and the existing fake Pi backend fixture. Never run this experiment against a real provider executable or use real credentials. Keep the original machine observation separate from this controlled fixture. Do not assume installed alpha20 includes fixes merged later on main.
  2. Fix the inputs: record the Cortex commit/binary digest, OS/runtime version and fake-backend digest, exact argument vector, role/backend/profile selection, canonical cwd identity, and catalog/profile/install-state/selected-asset identities. Compare only allowlisted synthetic fixture paths (relative names, type, mode, size, content digest, symlink target and file identity where supported). Never inventory a real home directory, credential files, private requests, or environment dumps. Record known/unknown explicitly for anything not observed.
  3. At most three attempts: in that same disposable fixture, run the identical invocation at offsets 0, 30 and 120 seconds, recording actual UTC and elapsed time. No setup, update, reinstall, file edits, cwd/profile changes, background writer, or remediation between attempts. The fake backend may record an invocation marker and return a fixed response; no model/network request is allowed. Output logs are separate from immutable input state. Stop after the first observed refusal-to-admission transition, any unexpected input change, or any missing safety prerequisite. These are manual experiment timings, not a new product retry policy.
  4. Per attempt: capture exit code, exact stdout/stderr from synthetic inputs, stage/admission_stage, the bounded route diagnostics if emitted, and whether the fake backend launch marker appeared. Snapshot allowlisted input identities immediately before and after each attempt. A refusal must leave input state unchanged and produce no backend launch marker. Keep every failed attempt; do not report only the eventual success.
  5. Controls: an unchanged shadowed-actor fixture must refuse with actor_shadow_unverified and no launch. A separate clean fixture with the fixed fake backend must pass admission. Removing a shadow or changing permissions between attempts is an explicit input-change control, not evidence of spontaneous recovery. Missing state/fingerprint failures should retain their own stage and expected/found evidence where applicable.

Interpretation and exit criteria

  • Stable refusal: same stage/output over the bounded observation window, not proof that the cause is permanently persistent.
  • Changed input: if an observed identity differs, report the difference; do not call the run an unchanged-input recovery.
  • Changed outcome, observed inputs stable: retain the paired attempt records and say exactly that. It is a reproducible outcome transition with no observed input change, not proof of an unchanged complete system or of a transient root cause. Unobserved OS/filesystem/runtime state remains unknown.
  • Not reproduced: report the bounded environment/attempts and limits. Passing controls or repeated tests do not invalidate the original report.
  • Cause established: require a repeatable trigger and an isolated control where changing only that trigger explains the admission transition, pinned by a regression test. No causal classification or fix is promised before this evidence exists.

The remaining investigation stays open until there is a safe paired-attempt reproduction or an explicitly accepted not-reproduced disposition. Initial deterministic controls are verified; the timed same-fixture outcome-transition experiment has not been run.

Verified controls (not an incident reproduction)

On the delivered tree 30228c802b5b026cf5ac40f7ba77431a8fff2bb7, the following command passed (exit 0) for both packages:

go test ./internal/cli ./internal/installobserve \\
  -run '^(TestQARunRefusesAShadowedActorBeforeLaunch|TestObserveAdmissionAssetsNamesRefusalStageForOpaqueChecks)$' \\
  -count=3 -v

The public CLI control checks exact failure code/stdout/stderr, no launch artifacts, and unchanged disposable input tree. The admission table covers seven stage categories. Each test repetition creates fresh fixtures: this confirms deterministic controls, not three invocations against one unchanged installation and not the reported minute-scale incident. No production runtime was touched and no real provider was called.

Activity

  1. barbatdev commented on Oct 20, 2026

    @barbatdev
    ContributorAuthor

    Fleet issue review (glm)

    Recommendation: approve

    Precise bug report from the #286 walkthrough: identical qa run invocations flip between instant actor_unavailable failure and success with no state change, and the generic admissionInvalid() path surfaces no stage while qa doctor does not probe admission. Expected behavior is stated and testable.

    Item Pass Evidence
    clear problem yes Admission refusals can surface no admission_stage diagnostic (generic admissionInvalid path) and a transient failure is indistinguishable from a persistent one; qa doctor does not probe QA admission at all.
    acceptance criteria present and testable yes Explicit expected behavior: admission refusals always name their stage (binding, shadow root, install state, fingerprint) and transient vs persistent refusal is distinguishable. Both checkable by triggering each refusal and reading the diagnostic.
    scope bounded yes Error-diagnostic surface of QA admission plus one doctor probe; single deliverable.
    no open questions yes No questions in body or comments.
    grounded in upstream yes Code search on default branch: qaAdmissionDiagnostic in internal/cli/qabackend.go and internal/cli/doctor.go; AdmissionUnavailableError and admissionInvalid in internal/installobserve/admission.go.

    Juan merges; the fleet applies the status:approved label when a review recommends approve.

  2. added
    status:approved
    on Oct 20, 2026
  3. barbatdev commented on Oct 31, 2026

    @barbatdev
    ContributorAuthor

    The opaque-stage defect is fixed on main at e19f02179f3484bfd9378677d791653dbfbbfd0e through #406, #407 and #410. Binding, install root, canonical cwd, guidance and shadow failures now carry typed stage tokens; doctor reports an inconclusive asset check as non-ready assets_unverifiable, not as a proven fingerprint mismatch.

    TestObserveAdmissionAssetsNamesRefusalStageForOpaqueChecks covers seven refusal categories; TestQARunRefusesAShadowedActorBeforeLaunch proves exact diagnostic, no launch and unchanged tree state. Independent verification found no guard loosening or refusal-order change. Each delivery PR passed CI, including Go tests, vet, race and repository policy checks.

    Keeping this issue open: the literal requirement to distinguish a transient cause from a persistent cause is not established by identifying the rejected check. A single observation cannot justify that causal claim. Remaining maintainer decision: accept explicit stage-only scope as sufficient, or define the additional reproducible observation needed for a causal distinction. No retry/repair mechanism or unsupported transience label was added. Umbrella: #401.

  4. barbatdev commented on Oct 31, 2026

    @barbatdev
    ContributorAuthor

    The bounded protocol experiment has been executed on the delivered source tree (30228c802b5b026cf5ac40f7ba77431a8fff2bb7), as a disposable synthetic fixture with the fake Pi backend. No real provider call, no production host, and no repository change; the scratch test was removed afterward (worktree verified clean).

    Procedure: one shadowed-actor fixture, three identical invocations at 0 s, 30 s and 120 s (UTC 10:54:12Z, 10:54:42Z, 10:56:42Z), no remediation or input change between attempts, input fingerprints compared before/after each attempt.

    Observed outcomes (all three attempts identical):

    exit=70 stdout=""
    error=actor_unavailable
    stage=actor_admission
    admission_stage=actor_shadow_unverified
    inputUnchanged=true, no backend launch marker
    

    Control (observed input change): removing the shadow file, an explicit and recorded input change, flipped the outcome to success (exit 0, the fake backend launched and reported). This is the isolated-control behavior the causal bar requires for that trigger, and it confirms the refusal is the shadow, not ambient nondeterminism.

    Interpretation per the protocol (no stronger claim):

    • Stable refusal: the outcome did not change over the 120-second observation window with observed inputs fixed. This does NOT prove the cause is permanently persistent and does not reproduce the original minute-scale incident, which happened on a different, unobserved environment.
    • Changed outcome, observed inputs stable: NOT observed here. The only outcome change was the explicit shadow-removal control.
    • Not reproduced: the original incident (same invocation flipping to success with no state change) was not reproduced in this bounded fixture. Repetition counts in these fixtures are fresh-state runs, not the original environment; the original report remains valid and open.
    • Cause established for the shadow trigger only: yes, per the causal bar (repeatable trigger + isolated control). This says nothing about the original incident's unknown trigger.

    Remaining work is unchanged: the outcome transition of the original report stays unexplained. What this experiment adds is a verified baseline: with observed inputs fixed, admission is deterministic in the delivered tree, so any future real reproduction needs a paired record showing what input or unobserved state differed. #401 remains open with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:approvedtype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions