Skip to content

Fix follow-ups from the discovery, paging and replica PRs (#1610-#1614) - #1618

Merged
gmh5225 merged 3 commits into
devfrom
claude/letenz-pr-followups
Oct 21, 2026
Merged

gmh5225 merged 3 commits into
devfrom
claude/letenz-pr-followups

Conversation

@gmh5225

@gmh5225 gmh5225 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Three defects found while reviewing the merged #1610-#1614:

  • Capability ledger (Expose owned stepped function discovery through the SDK #1611). neverd_session_discover_functions_step was not accounted for in docs/capabilities.json, so RepositoryCapabilityTests.test_repository_manifest_is_honest_and_executable fails on every build of dev. It is now listed with the general SDK API.
  • Stale discovery failure (Expose owned stepped function discovery through the SDK #1611). takeDiscoveryJob called get() before comparing the job's function-list revision. A job started for an earlier list or image that threw therefore failed the next poll (or synchronous call) for the current image: the worker marked that image's reference index unavailable without discovering it, and synchronous discovery returned -1 without running. The revision is now compared first; a stale job's result and failure are drained alike, and the current snapshot's own failure is still reported.
  • Cancelled prefetch (Reuse analysis replicas for bounded source preparation #1612). Cancel detaches the speculative source prefetch without completing it, leaving AnalysisPool::preparing_ set until the project changed. Any later read queued alone on the first lane was then taken for that preparation, and an independent view waited behind it instead of using the idle second replica.

Merging the PRs also required adapting dev's newer unsized-body reader and call graph to #1613's four-argument decodeFunctions visitor; that is in the #1613 branch's merge commit (48abecc).

Verification (Linux x64, Release, clang 23):

  • New SessionCAPITest.DiscoveryStepsReportOnlyTheCurrentSnapshotsFailure fails without the SDK fix (-1 from the poll) and passes with it; full NeverDSessionCAPITests: 197 passed.
  • New WorkbenchTests::cancelledPrefetchDoesNotHoldItsLane fails without the GUI fix and passes with it, together with the Reuse analysis replicas for bounded source preparation #1612 replica tests; full neverd-gui-tests: 196 passed, 1 failed (searchResultsClearOnFailureCloseAndProjectSwitch, which fails identically on dev before these merges, 66e7d43).
  • scripts.tests.test_check_capabilities ... test_repository_manifest_is_honest_and_executable passes.
  • Worker CTest (NeverDWorker*): 43 passed, including both discovery-readiness backends and the CLI/worker instruction-flow test; 6 were not built locally (Not Run).

Not addressed here: HighControlFlowSemantics.UnreachableCleanupDropsOnlyUnreferencedReturnsAfterSourceTraps fails the lift qualification on dev independently of these PRs (none of them touches lift code; it also fails locally on the merged dev).

docs/capabilities.json accounts for every public C declaration. #1611 added
neverd_session_discover_functions_step without listing it, which fails
RepositoryCapabilityTests.test_repository_manifest_is_honest_and_executable.
List it with the general SDK API beside the synchronous discovery call.
A retained discovery job was read before its revision was compared, so a job
started for an earlier list or image that threw made the next poll or
synchronous call fail for the current image: the worker then marked that
image's reference index unavailable without discovering it, and synchronous
discovery returned -1 without running. Compare the revision first and drain a
stale job's result and failure alike; the current image's discovery runs,
and a failure of its own snapshot is still reported.
Cancel detaches the speculative source prefetch without completing it, so
AnalysisPool kept preparing_ set until the project changed. Any later read
queued alone on the first lane was then taken for that preparation, and an
independent view waited behind it instead of using the idle second replica.
Clear the preparation state when cancellation does not keep its owner.
@gmh5225
gmh5225 merged commit 7bdc47b into dev Oct 21, 2026
6 of 24 checks passed
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