Skip to content

Rectify #4333: Freeze the Cumulative Context-Admission Contract#4346

Merged
Trecek merged 62 commits into
developfrom
impl-rectify_cumulative_context_admission_immunity_2026-07-22_223942-20260723-095824
Jul 25, 2026
Merged

Rectify #4333: Freeze the Cumulative Context-Admission Contract#4346
Trecek merged 62 commits into
developfrom
impl-rectify_cumulative_context_admission_immunity_2026-07-22_223942-20260723-095824

Conversation

@Trecek

@Trecek Trecek commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Freeze the versioned, implementation-independent contract required by #4333 before any cumulative ledger or enforcement work begins. The deliverable defines the exact model-visible admission boundary, stable identities and window-epoch rules, atomic lifecycle semantics, a version-pinned coverage matrix, authoritative accounting decisions, the upstream provider contract, privacy-safe observability, and the dependency graph for the existing C2–C8 issues.

The normative machine contract is a pure IL-0 state transition model plus frozen value types and a static coverage registry. ADR-0007 explains that contract and its evidence. This work does not create a journal, wire a producer, or change a model-visible result.

Closes #4333

Implementation Plan

Plan file: /home/talon/projects/generic_automation_mcp/.autoskillit/temp/rectify/rectify_cumulative_context_admission_immunity_2026-07-22_223942.md

🤖 Generated with Claude Code via AutoSkillit

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AutoSkillit PR Review — Verdict: approved_with_comments

Comment thread src/autoskillit/core/context_admission.py Outdated
Comment thread src/autoskillit/core/context_admission.py
Comment thread src/autoskillit/core/context_admission.py
Comment thread src/autoskillit/core/types/_type_context_admission.py Outdated
Comment thread src/autoskillit/core/types/_type_context_admission.py
Comment thread src/autoskillit/core/types/_type_context_admission.py
Comment thread src/autoskillit/core/types/_type_context_admission.py
Comment thread tests/core/test_context_admission_state_machine.py
Comment thread tests/core/test_context_admission_coverage.py
Comment thread tests/docs/test_context_admission_decision.py

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AutoSkillit review: warning-only findings detected. See inline comments — no blocking changes required.

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AutoSkillit PR Review — Verdict: changes_requested

Comment thread src/autoskillit/core/context_admission.py
Comment thread src/autoskillit/core/context_admission.py Outdated
Comment thread src/autoskillit/core/types/_type_context_admission.py
Comment thread src/autoskillit/core/context_admission.py Outdated
Comment thread src/autoskillit/core/types/_type_context_admission.py
Comment thread tests/core/test_context_admission_state_machine.py
Comment thread tests/core/test_context_admission_state_machine.py

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AutoSkillit review found 3 critical and 4 warning findings. See the inline comments for exact code anchors. GitHub does not permit the PR author to submit a REQUEST_CHANGES review, so this self-review is recorded as COMMENT; the AutoSkillit verdict remains changes_requested.

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AutoSkillit PR Review — Verdict: changes_requested

Comment thread src/autoskillit/core/context_admission.py Outdated
Comment thread src/autoskillit/core/context_admission.py Outdated
Comment thread src/autoskillit/core/context_admission.py
Comment thread src/autoskillit/core/types/_type_context_admission.py
Comment thread src/autoskillit/core/types/_type_context_admission.py Outdated
Comment thread src/autoskillit/core/types/_type_context_admission.py
Comment thread tests/core/test_context_admission_state_machine.py Outdated

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AutoSkillit review: blocking findings detected. See the inline comments. Verdict: changes_requested. GitHub does not allow an author to submit REQUEST_CHANGES on their own pull request, so this verdict is recorded as a comment review.

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AutoSkillit PR Review — Verdict: approved_with_comments

Comment thread src/autoskillit/core/context_admission.py Outdated
Comment thread src/autoskillit/core/context_admission.py Outdated
Comment thread src/autoskillit/core/types/_type_context_admission.py Outdated
Comment thread src/autoskillit/core/types/_type_context_admission.py


@dataclass(frozen=True, slots=True)
class ConflictRejectedEffect(_AdmissionEffectBase):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

[warning] cohesion: ConflictRejectedEffect is publicly exported and included in the closed AdmissionEffect union, but no reducer path constructs it: both event-ID and reservation-key conflicts return effects=(). This leaves a dead protocol variant whose relationship to CONFLICT decisions is undefined. Decide whether conflicts must publish this effect and wire both paths consistently, or remove the unused type from the protocol surface.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Valid observation — flagged for design decision. ConflictRejectedEffect is public but has no established publication semantics. Emitting it changes the closed AdmissionEffect protocol, while removing it changes the public protocol surface, so either direction needs an explicit contract decision.

Comment thread tests/core/test_context_admission_reducer.py
Comment thread tests/core/test_context_admission_state_machine.py Outdated

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

AutoSkillit review: warning-only findings detected. See inline comments — no blocking changes required.

Trecek and others added 22 commits July 24, 2026 19:48
…ducer

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
The state-machine test's rollover rule hardcoded the source epoch identity
(epoch 1) and target epoch identity (epoch 2). After the first successful
rollover, the active state moves to epoch 2; a second invocation then used
a fence proof whose old_window_epoch_id/old_window_epoch_number did not
match state.snapshot.window_epoch_id/state.snapshot.window_epoch_number,
and the reducer's stale-receiver-fence check at
src/autoskillit/core/context_admission.py:1591-1599 rejected the event.

Make the rollover rule derive old_window_epoch_id/old_window_epoch_number
from self.state.snapshot and bump new_window_epoch_number dynamically.
Also make fence/rollover witness IDs unique per invocation by including
self.event_sequence to avoid duplicate witness IDs in retained audit
chains.
@Trecek
Trecek force-pushed the impl-rectify_cumulative_context_admission_immunity_2026-07-22_223942-20260723-095824 branch from 77752aa to 3173e17 Compare July 25, 2026 03:42
@Trecek
Trecek enabled auto-merge July 25, 2026 03:50
@Trecek
Trecek added this pull request to the merge queue Jul 25, 2026
Merged via the queue into develop with commit 61f9b88 Jul 25, 2026
3 checks passed
@Trecek
Trecek deleted the impl-rectify_cumulative_context_admission_immunity_2026-07-22_223942-20260723-095824 branch July 25, 2026 04:09
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