Skip to content

Preserve paged branch-local continuity semantics - #19

Merged
dajiaohuang merged 1 commit into
mainfrom
audit/memory-plot-backtest-20260830
Aug 30, 2026
Merged

Preserve paged branch-local continuity semantics#19
dajiaohuang merged 1 commit into
mainfrom
audit/memory-plot-backtest-20260830

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Problem

Long campaigns exposed four authority-boundary defects: proposition-only actor-knowledge edits reset epistemic metadata and provenance; edits on a sibling branch retimestamped and reordered the current branch; fact/knowledge searches could not page beyond the first 100 results or provide cursor lookahead; and ContinuityService could neither traverse all three authority streams nor filter private facts before a player page was cut.

Solution

  • preserve omitted actor-knowledge status, confidence, provenance, cause, and disclosure values while retaining explicit provenance clearing
  • keep ContinuityCommit scene provenance bound to its newly committed event
  • derive fact recency and updated_at from the selected branch revision head
  • add validated offset pagination and a 1..500 internal page window to fact and actor-knowledge search
  • page fact, event, and actor-knowledge continuity windows together with per-stream lookahead and next_offset metadata
  • filter memory disclosure and context anchors before ranking and pagination
  • document the direct-revision, scene-commit, branch, and cursor semantics

Verification

  • 347 tests collected; full pytest suite passed with 2 expected skips
  • focused 125-record fact/knowledge and 105-record three-stream continuity regressions passed
  • player disclosure-before-pagination and sibling-branch recency regressions passed
  • ruff check src tests
  • git diff --check

Compatibility

Public facades can continue enforcing their existing <=100 response pages; the 500-record service boundary allows a one-record lookahead without unbounded reads. Continuity adds an optional offset and retrieval.pagination metadata without changing the default first-page result shape. Direct ActorKnowledgeService.revise now treats omitted optional fields as unchanged; source_event_id=None remains the explicit provenance-clear operation.

@dajiaohuang
dajiaohuang force-pushed the audit/memory-plot-backtest-20260830 branch from 95c37d2 to d290b23 Compare August 30, 2026 07:17
@dajiaohuang dajiaohuang changed the title Preserve branch-local long-term memory semantics Preserve paged branch-local continuity semantics Aug 30, 2026
@dajiaohuang
dajiaohuang force-pushed the audit/memory-plot-backtest-20260830 branch from d290b23 to f59e3e0 Compare August 30, 2026 07:20
@dajiaohuang
dajiaohuang merged commit c53cb8a into main Aug 30, 2026
4 checks passed
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