Skip to content

chore: Move raw materialization and aggregate refresh into canonical de… - #4970

Merged
Sinity merged 2 commits into
masterfrom
batch/polylogue-20260912-172536-194d428c/integration
Sep 12, 2026
Merged

Sinity merged 2 commits into
masterfrom
batch/polylogue-20260912-172536-194d428c/integration

Conversation

@Sinity

@Sinity Sinity commented Sep 12, 2026

Copy link
Copy Markdown
Owner

Batch polylogue-20260912-172536-194d428c on base 6e4bab29294e.

polylogue-6kur.3 Move raw materialization and aggregate refresh into canonical derivations

  • Admitted raw observations and retained insight/aggregate partitions each have one domain-owned derivation adapter under bp12n.1; no generic artifact representation mediates them.
  • Raw inspection proves expected raw-to-logical membership and parser recipe binding, including one-to-many splits, removals, legitimate zero-output classifications, stale outputs and excess logical ide
  • Session insights and aggregate families use their authoritative output relations and the ylh7v partition contract. Incremental, retry, restart and full rebuild invoke the same adapters and publication
  • An idle second pass is O(changed addresses), not O(total backlog): the census scanner and its fixtures are deleted and the two stale-cache regressions pass against the canonical route.
  • Deleting ops scheduling hints and retry telemetry and restarting reconstructs the same pending work. A failed unit cannot suppress unrelated work.
  • Clean source replay and incremental schedules produce equal declared semantic relations; a second unchanged pass writes nothing; stale-frame, crash-before/after-publish, poison sibling, split, removal
  • FtsSurfaceRepairResult is gone or its separate shape is justified in the module.
  • Anti-vacuity: disconnecting raw membership inspection, one aggregate adapter, source revalidation, or valid-empty evidence must fail focused production-route laws, with no fallback dispatch able to ma
  • Run focused raw materialization, parser/ingest, aggregate, storage, daemon, differential and restart tests through devtools; the managed archive-scale memory/writer-hold workload; oracle-integrity; qu
  • Every retained census reader uses the chosen replacement or has an explicitly retired product capability; repeated pre/post membership snapshots and their retention/paging owner disappear only after e

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T17:57:38.553254Z f2e75f9 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 4c54ad70-6c5b-43ab-81c3-9d27620e4865


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Sinity
Sinity merged commit a158a90 into master Sep 12, 2026
3 checks passed
@Sinity
Sinity deleted the batch/polylogue-20260912-172536-194d428c/integration branch September 12, 2026 17:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2e75f9b49

ℹ️ 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".

Comment thread polylogue/daemon/cli.py Resolved
Comment thread polylogue/daemon/cli.py Resolved
Comment thread polylogue/daemon/cli.py Resolved
Comment thread polylogue/daemon/cli.py Resolved
Comment thread polylogue/daemon/cli.py Resolved
Sinity added a commit that referenced this pull request Sep 28, 2026
#5751)

## 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:

| Finding | Disposition |
| --- | --- |
| #4970 `daemon/cli.py:3408`: a domain-level failure is filtered out and
reported as DUPLICATE | Fixed here. `admit_raw_intake` kept only
outcomes whose key was the raw id, so a `KeyOutcome(key="*", FAILED)`
from `run_domain` left `report.done == 0` and returned DUPLICATE. |
| #4970 `daemon/cli.py:3428`: `actual_cost=1` refunds the byte deficit |
Fixed here. Both callbacks returned `actual_cost=1` for items whose
`estimated_cost` is their payload size, so `FairIntakeDispatcher` gave
the difference back to the class deficit. |
| #4970 `daemon/cli.py:3412`: terminal parse failures are retried
forever | Still open, and reproduced at master. An invalid retained
payload records a failed membership census,
`RawObservationDerivation._inspect` reports `stale`, 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. |
| #5242 `daemon/cli.py:3018`: an interrupted cold-build begin leaves an
orphaned generation | Fixed later in 675a411 (#5619).
`ColdBuildGeneration.begin` calls `_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 without `actual_cost`. The raw callback still runs
profile convergence after an ADMITTED verdict.

`daemon/cli.py` is 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.py` on the pushed
head (job 1214): `Success`.

Anti-vacuity:
- Filtering outcomes to the raw's own key turns the `"*"` case into
DUPLICATE.
- `actual_cost=1` makes `reconciled_cost` equal `-4095`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

Closing out open Codex review threads on this PR (evidence checked against master at ef10e59):

Resolving the fixed, stale and refuted threads; tracked threads stay open.

@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

Closing out open Codex review threads on this PR (evidence checked against master at 64a9bd0):

  • P1 polylogue/daemon/cli.py:3406: Fixed on master (checked at 64a9bd0): converge_raw_id checks raw_frontier_source_selection_refusal before building the frame and raises for a refused path (polylogue/daemon/raw_observation_owner.py:56, 68-88). The adapter's publish repeats the frontier check under the writer lease (polylogue/storage/derived/raw.py:981-984).
  • P1 polylogue/daemon/cli.py:3406: Stale: Non-frontier replay-plan blockers no longer have a writer. The frontier census is the sole INSERT into raw_authority_blockers (polylogue/storage/raw_reconciler.py:458), and its rows carry the frontier_obligation origin (polylogue/storage/raw_authority.py:691-692); the replay-plan blocker route this finding relied on was removed. (checked at 64a9bd0)

Resolving every thread listed; confirmed defects are fixed under the named bead.

@Sinity

Sinity commented Sep 29, 2026

Copy link
Copy Markdown
Owner Author

Closing out open Codex review threads on this PR (evidence checked against master at 0914f89):

Resolving every thread listed; confirmed defects are fixed under the named bead.

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