Skip to content

test(context): assert the scheduler's budget contract, not the pre-scheduler one - #4429

Merged
Sinity merged 1 commit into
masterfrom
fix/context-budget-omission-contract
Aug 30, 2026
Merged

Sinity merged 1 commit into
masterfrom
fix/context-budget-omission-contract

Conversation

@Sinity

@Sinity Sinity commented Aug 30, 2026

Copy link
Copy Markdown
Owner

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

…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
@coderabbitai

coderabbitai Bot commented Aug 30, 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 721ec66e-8951-49d9-8993-2e9e24ed163a


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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 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-08-30T00:48:24.350458Z 3e8db26 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.

@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: 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".

@Sinity
Sinity merged commit 6480f1f into master Aug 30, 2026
3 checks passed
@Sinity
Sinity deleted the fix/context-budget-omission-contract branch August 30, 2026 00:55
Sinity added a commit that referenced this pull request Sep 1, 2026
…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]>
@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 bf68918):

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