Repository navigation
test(context): assert the scheduler's budget contract, not the pre-scheduler one - #4429
Conversation
…heduler one This test asserted that a one-token budget returns both segments truncated with `omitted == ()` — nothing dropped, ever. #4256 (`4fe69f466`) replaced that with an admission scheduler, and the closed bead it lands, polylogue-37t.11.1, requires the opposite: AC3 says the ledger records dropped items with their budget state and disclosure verdict, and AC2 forbids exceeding the moment budget. Two segments cannot both survive one token, so a drop is mandatory and recording it is the contract. The test's own name already said `with_omission_accounting`; only its assertions predated the scheduler. It now pins that the budget admits what fits, clips it, records the rest as `ContextOmission(view="scheduler", reason="budget")`, and that the admitted and dropped sets are disjoint. This is a supersession confirmed against the superseding bead's acceptance criteria, not a test corrected because current output looked reasonable. Verification: pytest tests/unit/cli -p no:randomly — 1 failed, 2871 passed, down from 19 failures on master. devtools verify --quick — exit 0. Anti-vacuity: removing the ledger's omission reporting from `polylogue/api/archive.py` turns this red. The one remaining CLI failure is polylogue-e60z5, a genuine design question about whether canonical usage provenance outranks a stored provenance. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 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. Comment |
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: 3e8db263a5
ℹ️ 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".
…heduler one (#4429) ## Summary This test asserted that a one-token budget returns both segments truncated with `omitted == ()` — nothing dropped, ever. #4256 (`4fe69f466`) replaced that with an admission scheduler, and the closed bead it lands, polylogue-37t.11.1, requires the opposite: AC3 says the ledger records dropped items with their budget state and disclosure verdict, and AC2 forbids exceeding the moment budget. Two segments cannot both survive one token, so a drop is mandatory and recording it is the contract. The test's own name already said `with_omission_accounting`; only its assertions predated the scheduler. It now pins that the budget admits what fits, clips it, records the rest as `ContextOmission(view="scheduler", reason="budget")`, and that the admitted and dropped sets are disjoint. This is a supersession confirmed against the superseding bead's acceptance criteria, not a test corrected because current output looked reasonable. Verification: pytest tests/unit/cli -p no:randomly — 1 failed, 2871 passed, down from 19 failures on master. devtools verify --quick — exit 0. Anti-vacuity: removing the ledger's omission reporting from `polylogue/api/archive.py` turns this red. The one remaining CLI failure is polylogue-e60z5, a genuine design question about whether canonical usage provenance outranks a stored provenance. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
|
Closing out open Codex review threads on this PR (evidence checked against master at bf68918):
Resolving every thread listed; confirmed defects are fixed under the named bead. |
Summary
This test asserted that a one-token budget returns both segments truncated with
omitted == ()— nothing dropped, ever. #4256 (4fe69f466) replaced that withan admission scheduler, and the closed bead it lands, polylogue-37t.11.1,
requires the opposite: AC3 says the ledger records dropped items with their
budget state and disclosure verdict, and AC2 forbids exceeding the moment
budget. Two segments cannot both survive one token, so a drop is mandatory and
recording it is the contract.
The test's own name already said
with_omission_accounting; only itsassertions predated the scheduler. It now pins that the budget admits what
fits, clips it, records the rest as
ContextOmission(view="scheduler", reason="budget"), and that the admitted and dropped sets are disjoint.This is a supersession confirmed against the superseding bead's acceptance
criteria, not a test corrected because current output looked reasonable.
Verification: pytest tests/unit/cli -p no:randomly — 1 failed, 2871 passed,
down from 19 failures on master. devtools verify --quick — exit 0.
Anti-vacuity: removing the ledger's omission reporting from
polylogue/api/archive.pyturns this red.The one remaining CLI failure is polylogue-e60z5, a genuine design question
about whether canonical usage provenance outranks a stored provenance.
Co-Authored-By: Claude Opus 5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_014BQsaB1NBY8mTR6yZByfMA