Skip to content

test(qa): fixes from the 2026-10-05 nightly analysis - #2530

Closed
giokur wants to merge 7 commits into
mainfrom
test/qa-fix-2026-10-05
Closed

giokur wants to merge 7 commits into
mainfrom
test/qa-fix-2026-10-05

Conversation

@giokur

@giokur giokur commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Six commits from the qa all-tests nightly of 2026-10-05 (449 tests, 10 failures, 18 aborts). They address 7 of the 10 failures and should clear 7 of the 18 aborts. All test-library only — no product change.

The failures these fix

devicesCount is no longer a field on type Software — 4 failures.
#2518 (526971cd0, 10-02, "device tabs stop reading a fleet-wide devicesCount per row") removed it. That commit is the fix for the stage finding of 10-01, where devicesCount DESC was accepted and returned unordered rows — so the library has to follow. The server was rejecting the whole document:

Validation error (FieldUndefined@[softwares/edges/node/devicesCount])
  : Field 'devicesCount' in type 'Software' is undefined

Removed from the three Software-typed selections and the assertions reading it; kept on Vulnerability and AffectedSoftware, which still declare it. The removal is understood to be temporary, so the DTO field stays and the diff is limited to selections and assertions. An unknown machineId is NOT_FOUND… was failing only as collateral — validation rejected the query before a resolver could return the NOT_FOUND it asserts.

A second site had the same cause but had not fired yet: deviceVulnerabilities rows, whose doc went from "devicesCount stays fleet-wide" to "devicesCount is null here". Now asserts null.

Ownership transfer leaves both roles — 2 failures. The promoted user holds [OWNER, ADMIN], not [OWNER]; confirmed as intended. Demotion is not symmetric and those assertions already passed, so they are unchanged. Switched to containsExactlyInAnyOrder since nothing documents an order.

filteredCount is the total, not the size of one page — 1 failure, and the biggest source of aborts. Six assertions equated filteredCount with the number of nodes returned, which holds only where one page holds every row: true on the pipeline's single-device tenant, false on the long-lived qa and stage ones (2374 titles, 5129 CVEs against a default page of 20). Two shapes were wrong — the unpaged reads now assert >=, and the first: 1 reads compare against the unpaged read's own filteredCount rather than using a page as a proxy for the total.

Scoping, not fixing

Fleet needs time before it reports CVEs, so a tenant registered minutes ago has none. Both CVE fixture points now key off PipelineContext.hasRegisteredTenant(): on a fresh tenant the fleet-wide list aborts with the reason and the "at least one title carries a CVE" assertion is skipped, leaving dependants to abort through the existing guard. On a long-lived tenant nothing changes and an empty list is still a failure.

This also forestalls a regression the devicesCount fix would otherwise have introduced: with the query working again, testListSoftware reaches that assertion on a fresh tenant for the first time, where it would have failed and cascaded into five more aborts.

Two cases disabled while the lists come straight from Fleet — the source facet returns empty though every title has a source, and a title named U+200E sorts before .env files under Fleet's collation but not Java's. Both assert on Fleet's own data. Neither publishes a fixture, so the ordered chain is unaffected, and the skips carry the reason into the report.

Verification

SoftwareInventoryTest against qa test-env, with the box enrolled so every case runs:

before:  4 failures,  9 skipped
after:  12 run, 0 failures, 2 skipped  — BUILD SUCCESS

Causation for the devicesCount change, in a separate worktree at the base commit e74cd7590: An unknown machineId is NOT_FOUND on all four device-scoped reads fails there at SoftwareInventoryTest:427 [deviceSoftware] with devicesCount still in the request, and passes with the change. The paging change is pinned by the progression on one tenant: the original wording failed, fixing only the unpaged sites moved the failure to the first: 1 site, fixing both passes.

Also run on qa while tracing the rest of the nightly: CreatePolicyTest 2/2, DeviceRemoteTest 3/3.

Not run: the two ownership cases assume hasRegisteredTenant() and abort outside a pipeline, and the fresh-tenant branch of the CVE scoping needs an all-tests run. Tomorrow's 02:00 UTC nightly is the first real exercise of both.

Not addressed — 3 failures, all environment

  • A single edge stream timeout at 02:02:18 cost two cases: Select policy device never assigned the host, so Windows version policy is compliant 21 minutes later correctly found none. One cause, not two; CreatePolicyTest passes here.
  • Remote Desktop timed out waiting for load state. The class passes on qa with a longest single wait of 3.2s against a 30s ceiling, so this was something stuck rather than a thin margin — raising the timeout would be the wrong fix. It hit ~4 minutes after the agent was installed on a fresh tenant.

Separately worth a decision, not changed here: the pipeline's remote-access-setup phase sets the tenant to Silent mode, which makes "the device approves a pending request" and "revoke a pending request" unreachable by construction — two permanent aborts until those cases either flip the policy around themselves or are tagged out of the pipeline.

🤖 Generated with Claude Code

giokur and others added 6 commits October 5, 2026 08:01
Both ownership-transfer cases asserted the promoted user holds OWNER alone. The
product grants OWNER and leaves the ADMIN the user already had, so the new owner
carries both — confirmed as intended behaviour, not a bug.

Evidence: the qa nightly observed [OWNER, ADMIN] on both cases on 2026-10-02 and
again on 2026-10-05, four observations in total. Demotion is not symmetric: the
outgoing owner is set to ADMIN alone, and those two assertions already passed and
are unchanged.

Switched to containsExactlyInAnyOrder so role order is not load-bearing, since
nothing in the API documents one.

Compiled, not run: both cases assume PipelineContext.hasRegisteredTenant(), which
only an all-tests pipeline sets, so they abort outside one. The next qa nightly
exercises them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
oss-lib #2518 (526971c, 2026-10-02) removed `devicesCount` from `type Software`
in software.graphqls — the fix for the stage finding of 2026-10-01, where
`devicesCount DESC` on the device-scoped list was accepted and returned unordered
rows. The library kept selecting it, so the server rejected the whole document:

  Validation error (FieldUndefined@[softwares/edges/node/devicesCount])
    : Field 'devicesCount' in type 'Software' is undefined

That failed four cases in the qa nightly on 2026-10-02 and 2026-10-05, including
"An unknown machineId is NOT_FOUND on all four device-scoped reads", which only
failed as collateral: validation rejects the query before a resolver can return
the NOT_FOUND it asserts.

Removed from the three Software-typed selections (SOFTWARES, SOFTWARE,
DEVICE_SOFTWARE) and from the assertions that read Software::getDevicesCount.
Kept everywhere the schema keeps it — `Vulnerability` and `AffectedSoftware` both
still declare it. The removal is understood to be temporary, so the DTO field
stays and the diff is limited to the selections and the assertions that read it.

The two sort cases that ordered by devicesCount are dropped: the fleet-wide query
still advertises it as a sort key, but the order it produces can no longer be read
back, which the remaining refusal-message assertion still covers.

Verified against qa test-env. The validation error is gone:
"An unknown machineId is NOT_FOUND on all four device-scoped reads" now passes,
and at the base commit e74cd75 the same case fails at
SoftwareInventoryTest:427 [deviceSoftware] with devicesCount still in the query.
The two vm115982 cases could not be reached: testListSoftware still fails on the
unrelated "Without first, one page holds every title" assumption (2116 titles on
that tenant), which cascades the rest of the class into skips.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The same #2518 change that removed devicesCount from `type Software` also stopped
populating it on deviceVulnerabilities rows — its doc went from "`devicesCount`
stays fleet-wide" to "`devicesCount` is null here (the fleet-wide count would cost
one Fleet call per row)". The field still exists on `Vulnerability`, so there is no
validation error and the case did not fail; it aborts on this tenant for lack of
Fleet CVE data, which is why the nightly never reported it.

Asserting null rather than positive, and dropped the comparison against the
fleet-wide count, which cannot hold now. The fleet-wide list keeps its own
positive assertion, where the value is still populated.

Compiled, and the class runs clean on this assertion against qa test-env.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Six assertions equated filteredCount with the number of nodes a query returned.
That holds only where one page holds every row — true on the single-device tenant
the all-tests pipeline registers, false on the long-lived qa and stage tenants,
where the server returns its default 20 of 2374 titles and 5129 CVEs.

Two shapes were wrong:
- the unpaged reads asserted filteredCount == nodes.size(); they now assert
  filteredCount >= nodes.size(), which is what the field means;
- the first: 1 reads asserted the one-row page's filteredCount == nodes.size() of
  the earlier unpaged read, using that page as a proxy for the total. They now
  compare against the unpaged read's own filteredCount, which is the total and is
  page-independent — the property those lines were written to pin.

Verified against qa test-env (2374 titles, 5129 CVEs), where the box is now
enrolled so every case runs: the class goes from 4 failures and 9 skips to
12 run, 0 skipped, 2 failures. Progression across runs on the same tenant:
original assertion failed at "Without first, one page holds every title"; with
only the unpaged sites fixed it failed at the first: 1 site; with both it passes.

The two remaining failures are unrelated and newly visible rather than newly
broken — they were skipped before, because the paging failure cascaded through the
class. Reported, not fixed: a title named U+200E sorts before ".env files" under
the server's collation but not Java's CASE_INSENSITIVE_ORDER, and the source facet
comes back empty on this tenant.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both read the fleet software list straight from Fleet, so what they assert on is
Fleet's data rather than anything the platform owns: the source facet comes back
empty on the qa tenant though every title has a source, and a title named U+200E
sorts before ".env files" under Fleet's collation but not Java's
CASE_INSENSITIVE_ORDER. Disabled while the lists come directly from Fleet.

Neither case publishes a fixture, so the ordered chain is unaffected. Skips carry
the reason into the Slack report.

Verified against qa test-env with the box enrolled:
Tests run: 12, Failures: 0, Errors: 0, Skipped: 2 — BUILD SUCCESS.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fleet reports CVEs some time after a host enrols, so a tenant the run registered
minutes ago has none yet. The nightly of 2026-10-05 failed "List the CVEs across
the fleet" on [Fleet reports CVEs on the tenant's devices] for exactly that reason,
and the two cases downstream of it aborted.

Both CVE fixture points now key off PipelineContext.hasRegisteredTenant(), which is
true only on a run that registered its own tenant:
- the fleet-wide CVE list aborts with the reason instead of failing;
- the "at least one title carries a CVE" assertion is skipped, leaving
  vulnerableSoftware null so the cases needing it abort through
  requireFleetSoftware() rather than NPE.

On a long-lived tenant — e2e against the configured one, the dev suite, a bare
POST /tests/run — nothing changes and an empty CVE list is still a failure.

This also forestalls a regression the devicesCount fix would otherwise have
exposed: with the query working again, testListSoftware now reaches that CVE
assertion on a fresh tenant, where it would have failed and cascaded into five
more aborts.

Two cascade messages said "see that failure", which is wrong when the fixture is
simply absent; they now say "see that case".

Verified against qa test-env (established tenant, so the assertions still apply):
Tests run: 12, Failures: 0, Errors: 0, Skipped: 2 — BUILD SUCCESS.
Not verified on a fresh tenant: that path needs an all-tests pipeline run.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🦩 Flamingo Code Review

Not reviewed yet. Reviews start when you ask, so the reviewer reads this pull request when it is ready, not when it is opened.

When it is ready:

  • Review this pull request

Or comment @flamingo-review. Add the flamingo-review-always label to review every push.

Updated 2026-10-05 08:18 UTC · workflow run

The enrolled box runs Windows Server, where winget is not supported, so its agent
reports winget=UNKNOWN and the bundle submit refuses a package manager that is not
usable. Nothing installs, and the software-action history then has no finished
install to read.

That one precondition cost 8 cases in the qa nightly of 2026-10-05 — more than any
single failure group in the run:
- SoftwareBundleTest: submit, resubmit, install-finishes, SSH uninstall;
- SoftwareActionHistoryTest: list finished installs, read one action, drill into
  its devices, count by status/action/engine.

Disabled with the reason on each, so the report states it rather than showing a
root abort plus three "see why there" cascades.

Kept: the bundle draft lifecycle and assignment cases, which need no package
manager, and "Read an empty software action history", which is self-contained on a
no-match search.

Verified against qa test-env:
  SoftwareBundleTest         11 run, 0 failures, 4 skipped
  SoftwareActionHistoryTest   5 run, 0 failures, 4 skipped

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@aliaska-varieva

Copy link
Copy Markdown
Contributor

Closing as stale: no activity for over 2 weeks. Reopen if still needed.

@aliaska-varieva
aliaska-varieva deleted the test/qa-fix-2026-10-05 branch November 9, 2026 01:23
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.

2 participants