Skip to content

Linear cost failures include each sample’s process context - #1088

Open
zlareb1 wants to merge 6 commits into
mainfrom
test/linear-cost-sample-context
Open

zlareb1 wants to merge 6 commits into
mainfrom
test/linear-cost-sample-context

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Related: #1090

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry

Not required.

Why

Linear cost failures need each sample's process state to distinguish a changing measurement regime from growing parser work. Selected minima alone omit the samples the judge did not select.

Record process, wall and thread clocks, allocation counts, GC state, and tracing/profiling state around each original sample. Scalar checks and the independent lane-walk child retain all sample values and their order. Registered lanes retain their sample values and boundary context. The direct SQL ratio check opts into the same context through its existing CPU helper. Failure output encodes the complete context as JSON.

Scope and risk

The hook-contract prerequisite waits for owned detached-flusher completion before removing its sandbox. Its original hook deadlines and assertions remain unchanged. The fixture uses the existing isolated-home import and cross-platform child environment helper. This addresses a separately reproduced teardown race, with no production hook change.

Related person-query fixture changes keep observations scoped to the authorization decision. Focused checks also verify the isolated write leases for the replicated erasure fixture and its unit companion already on main. Their finite-budget, replicated-content and missing-store controls stay intact. No production lease or authorization rules change.

Observation runs outside the original timed cost calls. Boundary deltas include observer work and, for lane walks, registered lanes and SQL, collection and tracer restoration. Observer work and allocations can perturb later calls; these fields are diagnostic context, not a new cost measurement or acceptance criterion. Input text and exception messages are omitted. A context collection error records its class without changing the judge.

The independent lane-walk child emits one packet containing the same two CPU minima and all six ordered samples. Its parent preserves the comparison, floor, subprocess deadline and failure behavior. Input sizes, call order, sample count, min selection, warmup and retry policies remain unchanged. The causes of the Python, Lua, SQL and setup.cfg cost failures remain unknown. This change claims no parser performance fix.

Compatibility, rollout and rollback

Wire changes and operator steps: none. Reverting changes only test code.

Tests

All 47 directly related diagnostic, helper, judge, fixture and single SQL cases and six hook cleanup cases pass on this composition. Scoped source formatting, lint where applicable, public prose and committed-range whitespace checks pass. The source tree equals the expected three-way composition with main; every prior concern file retains its exact Git blob and mode. The earlier full CI result belongs to the previous public head. This head requires a new independent whole review and full hosted CI before merge.

Prior-head source evidence

  • Missing-context regressions fail before each diagnostic extension and pass afterward.
  • The independent walk controls produce eight failures and four passes before the extension; the identical twelve cases pass afterward.
  • All 47 focused helper, judge, fixture and single SQL checks pass, including unchanged pass/fail outcomes, all six walk samples, original errors, child failure, invalid JSON, timeout, context errors and unsampled callers.
  • AST and source comparison confirms the original walk timing block, input generation, six-call min selection, workload definitions, subprocess launch, deadlines and parent comparison remain unchanged. The scalar judge, registered-lane warmup and judge, SQL timed block, inputs, order and assertion expressions are unchanged.
  • Scoped Ruff format/lint, prose and diff checks pass. Full hosted CI and a fresh independent whole review of the new public head remain required before merge.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex wrote the diff and checked the timing boundaries, unchanged judges, focused regressions and AST comparisons.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full required CI passes on the new public head.
  • A fresh independent whole review is complete on the new public head.
  • Commits are signed off.

@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Nov 21, 2026 1:26am UTC

Request Review

@zlareb1
zlareb1 force-pushed the test/linear-cost-sample-context branch 2 times, most recently from 9bb65e3 to 4541d35 Compare November 21, 2026 00:04
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Shared client schema reads run with an independent context. Record only decision-tagged statements while retaining unbounded decision reads as failures.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
(cherry picked from commit 57327d5)
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep each test sandbox until its detached flusher removes its final job marker. Preserve hook deadlines and verify unfinished jobs refuse cleanup.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
(cherry picked from commit 2e63764)
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
(cherry picked from commit 334a924)
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the test/linear-cost-sample-context branch from 4541d35 to be775cb Compare November 21, 2026 01:23

This branch has not been deployed

No deployments
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