Repository navigation
fix(daemon): retry domain-level derivation failures and keep byte cost - #5751
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1afcdad7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…dmission Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Sinity
force-pushed
the
claude/derivation-admission
branch
from
September 28, 2026 22:07
ea12330 to
effbcb8
Compare
This reverts commit effbcb8.
This reverts commit 8981190.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Sinity
enabled auto-merge (squash)
September 28, 2026 22:42
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 free
to 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.
Summary
The daemon's raw-observation and hook-carrier intake callbacks now map a derivation pass to a fair-intake verdict through one helper,
_derivation_admission(polylogue-1tyq5.130). A discovery failure the kernel records under the domain-wide key"*"is retryable, where it was previously acknowledged as a duplicate. An admitted item keeps the byte estimate discovery charged, where it was previously reported as costing one unit.Problem
Findings from #4970 and #5242, rechecked at master 841bbb3:
daemon/cli.py:3408: a domain-level failure is filtered out and reported as DUPLICATEadmit_raw_intakekept only outcomes whose key was the raw id, so aKeyOutcome(key="*", FAILED)fromrun_domainleftreport.done == 0and returned DUPLICATE.daemon/cli.py:3428:actual_cost=1refunds the byte deficitactual_cost=1for items whoseestimated_costis their payload size, soFairIntakeDispatchergave the difference back to the class deficit.daemon/cli.py:3412: terminal parse failures are retried foreverRawObservationDerivation._inspectreportsstale, and the kernel returns FAILED, so intake retries it after every restart. An inspect-level terminal classification was tried here and withdrawn after review. A correct fix must keep transient read errors retryable, retire any output the raw already materialized, and bind the refusal to the origin's parser fingerprint. It stays with polylogue-1tyq5.130.daemon/cli.py:3018: an interrupted cold-build begin leaves an orphaned generationColdBuildGeneration.begincalls_reclaim_abandoned_cold_generations, which discards any inactive cold-build generation before allocating a new one. Evidence:test_next_build_reclaims_abandoned_inactive_candidate_before_capacity.Solution
_derivation_admission(report, key, subject=...)considers outcomes for the key and for"*", and uses the authoritative failure and pending counts when the retained sample is truncated. It returns ADMITTED or DUPLICATE withoutactual_cost. The raw callback still runs profile convergence after an ADMITTED verdict.daemon/cli.pyis not in the derived-identity closure (devtools schema closure:out).Verification
agentctl job start polylogue pytest_focused -- tests/unit/daemon/test_derivation_admission.py tests/unit/daemon/test_raw_observation_owner.py tests/unit/daemon/test_raw_materialization_fair_intake.py tests/unit/storage/test_raw_observation_derivation.pyon the pushed head (job 1214):Success.Anti-vacuity:
"*"case into DUPLICATE.actual_cost=1makesreconciled_costequal-4095.🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg