Uh oh!
There was an error while loading. Please reload this page.
test(runtime): withhold and assert the expected error noise in two passing pins - #10630
Merged
Merged
Conversation
…ssing pins Both suites PASS while printing ERROR-shaped lines into the shared Test Core log, where turbo interleaves package output without attribution. Those lines were adopted verbatim as a p1 flake signature (#10293) and sent a full dispatch cycle at the wrong mechanism. Each expected line is now withheld by a sink scoped to the named table AND the named reason, and COUNTED — the tests assert the counts, so a capture that went quiet because the emission disappeared fails instead of passing silently. Anything unexpected still reaches the console untouched. Fixes#10380 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bmVFqoQPq63zhKrxdYG1r
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. |
os-elon
marked this pull request as ready for review
August 21, 2026 08:23
Uh oh!
There was an error while loading. Please reload this page.
os-elon pushed a commit
that referenced
this pull request
Aug 22, 2026
…oise in 16 passing pins (#10629) Sixteen passing `@objectstack/runtime` fixtures printed expected read failures into the shared shard log: 134 `[sql-driver] DATABASE_ERROR — the backend refused a read on '<table>'` envelopes plus their 134 matching `ERROR Find operation failed` engine frames, 268 lines in all. Turbo interleaves package logs without attribution, so an ERROR-shaped line from a green test is indistinguishable from a real failure — lines of this shape were once lifted verbatim into a p1 flake signature (#10293). Every one is a fail-soft probe whose missing-table answer the runtime swallows by design: `resolveUserAuthzGrants`' six `sys_*` `tryFind`s, `ObjectQL.probeInstallOrganizations`, `SeedLoaderService.resolveSoleOrganizationId`, the lifecycle governance snapshot, `runBuildProbes`' view read, and the boot metadata load. Each was judged expected rather than diagnostic; none was silenced on the strength of looking like noise. Applies PR #10630's ruled shape verbatim, factored into one shared test-only module: withhold only a line naming an expected table AND carrying that same table's `no such table` reason, count what was withheld, and assert the counts. The engine frame is withheld only when it sits directly above a driver refusal the capture already recognised, so an identically-shaped fault from another cause still reaches the log with both halves intact. No test skipped, quarantined, retried or removed: 179 files / 2679 tests pass before and after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bmVFqoQPq63zhKrxdYG1r
This was referenced Aug 22, 2026
Merged
os-elon pushed a commit
that referenced
this pull request
Aug 23, 2026
extend expected-read-refusal-noise.ts with a second predicate keyed on the cross-field refusal's own message identity, since the refusal never reaches the driver's backendStatementFault and so has no table to key on. Counts per object instead of per table; the caller asserts the counts in its own afterAll, same withhold-and-assert discipline as #10629/#10630.
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 freeto 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.
Fixes#10380
Two passing
@objectstack/runtimetests printed ERROR-shaped lines into the sharedTest Corelog, where turbo interleaves package output without attribution. They were lifted verbatim into a p1 flake signature and cost a full dispatch cycle aimed at the wrong mechanism. This withholds that output — and asserts it, so the pins get stronger, not quieter.Not a mute — the hazard this is built against
Silencing console output is one step from swallowing a real error: a naive capture makes the log quiet and the test blind, and a live pin becomes a decoration. Every sink here does two things instead of one.
sys_metadataand carries knex'sTimeout acquiring a connection; the conformance suite withholds one only when the envelope and the dialect detail name the same absent table (no such table: X). Any other table, any other reason, any other driver, any other logger method — forwarded to the console untouched.afterAllthat each of the five per-request authz reads still failed.erroris withheld only when it sits directly above a driver refusal the capture already recognised. ADATABASE_ERRORon one of those tables from any other cause is not recognised by the driver sink, so its frame is not withheld either — it reaches the log with both halves intact.⛔ The #7842 pin's assertions are untouched. No
expectwas edited, none relaxed, no threshold moved, nothing skipped or retry-wrapped. The added assertions are additions only.Three channels, not the two the card named
The card named
Acquire connection errorandrefused a read on. Re-deriving both paths at head found a third emitter on the same fault in the same two files: the engine'sERROR Find operation failedframe (objectql/src/engine.ts), which carries the same error as a full stack. It is the loudest of the three and the only one that bypasses the reporter, so quieting only the two named features would have left the worst line in place. Named here rather than folded in silently.Acquire connection errorLogger.warn→console.loglog.warnvia the driver config;debug/error/deprecatekeep their defaultsrefused a read onSqlDriver.backendStatementFault→console.warnloggerfield's own documented "tests inject a spy" idiom, mirroring the default{ warn, error }shapeFind operation failedObjectQLengine logger → raw stdoutProxyonerroralone, the idiomengine-readonly-when-parent.test.tsestablishedMeasured, not asserted
Counts are matching log lines per suite, taken with
--reporter=default. That flag is load-bearing: vitest 4 picksMinimalReporterwhen stdout is not a TTY and it defaults tosilent: 'passed-only', so a piped local run dropsconsole.*from passing tests entirely — while turbo gives CI's task a pty and prints every line. Measuring without it yields a false zero in both directions. Filed as part of #10629.Acquire connection errorrefused a read onFind operation failedmetadata-list-ambient-vs-bare-transactionbeforemetadata-list-ambient-vs-bare-transactionafternotification-schema-conformancebeforenotification-schema-conformanceafterThe second leg: the assertions fail when the expected error is prevented
A green run alone is uninformative — it cannot tell a pin from a mute. Both were ablated.
Conformance suite —
tryFindshort-circuited for the six tables, so the expected reads never fail.@objectstack/coreis aliased to source in this package's vitest config, so the mutation took effect without a rebuild, demonstrated by the verdict changing:All eight conformance tests still pass. Nothing but the new assertion notices — which is exactly the blindness the card was written against.
Ambient pin — the
this.logger.warncall dropped fromSqlDriver.backendStatementFault, so the fault still occurs but one channel goes silent.@objectstack/driver-sqlresolves throughdisthere, so this leg was rebuilt and proven to reach the artifact both ways (scripts/ablation-dist-preflight.mjs, marker present after the mutation, absent after restore — the first marker spelling was tree-shaken into the sourcemaps only and the preflight correctly voided that run):Every original pin assertion passed; only the new one failed.
Verification at
2779695860Gate set re-derived with
node scripts/pm/dispatch-gates.mjs(no path arguments) after the final commit; every family it named was run, each verdict line quoted.pnpm --filter @objectstack/runtime exec vitest run—Test Files 178 passed (178)·Tests 2670 passed (2670)pnpm --filter @objectstack/runtime typecheck—tsc --noEmit, exit 0check-cross-package-test-inputs—OK: 12 package(s) read outside themselves, all declaredcheck-affected-docs— exit 0check:query-options-erasure—✓ query-options-erasure ratchet holds: 67 unswept non-test site(s) ... none newcheck:engine-double-contract—OK — 350 pinned, 133 in the DEBT ledger, 2 exemptcheck:where-matcher—✓ where-matcher conformance holds: 271 matcher(s) discovered ... none newcheck:nul-bytes—OK (scanned 6203 text file(s) ... no raw ASCII control bytes)check:type-check-coverage—OK — 64/77 workspace packages type-checkedcheck:type-check-debt—✓ ... OK — 33 ledger entr(ies) re-measured in 237.1s, 1924 raw tsc error(s) total, none above its recorded numbercheck:type-check-debtfirst refused (exit 1, not measured) on an unbuilt worktree; re-run afterturbo run build --filter='./packages/*' --filter='./packages/*/*', which is the verdict quoted.skip-changesetTest-only. Two
*.test.tsfiles, no production source touched, nothing published changes and no request is answered differently.Out of scope, filed not fixed
@objectstack/runtimetests print the samerefused a read onfeature — 134 lines after #10380 quiets its two, led bynotifications.hono.integration.test.ts(52) #10629 — 15 other passing@objectstack/runtimetests print the samerefused a read onfeature (134 lines, led bynotifications.hono.integration.test.tsat 52). Same defect class, different file surface than this card claims.#10293 is deliberately not addressed here — this removes the cause of that misreading; re-grading it is not this card's.
Generated by Claude Code