Skip to content

feat: harden session lifecycle and export invariants (Fixes #15) - #68

Merged
rosspeili merged 1 commit into
ARPAHLS:mainfrom
rosspeili:feat/issue-15-session-invariants
Aug 29, 2026
Merged

feat: harden session lifecycle and export invariants (Fixes #15)#68
rosspeili merged 1 commit into
ARPAHLS:mainfrom
rosspeili:feat/issue-15-session-invariants

Conversation

@rosspeili

Copy link
Copy Markdown
Contributor

Hardens session lifecycle and export invariants (#15):

  • Closed session is sealed — double-close, emit-after-close, and duplicate open raise clear errors (SessionClosedError, SessionAlreadyOpenError)
  • Atomic export — summary + OTel written to staging paths and committed together; partial failures leave neither artifact updated
  • export=False still builds a receiptrun.summary, run.audit_report, and run.conformance populated in memory on context exit
  • Open-time baseline frozenopen_snapshot_hash and declared_rules captured at open for conformance; runtime skill binds may still update live rules / snapshot_hash

Fixes #15

Type

  • Core framework — session, spine, constraints, identity, audit report
  • Documentation

Checklist

  • Linked issue (Fixes #15)
  • pytest passes (90/90)
  • black aura tests — no diff
  • flake8 aura tests — clean
  • CHANGELOG.md updated when user-visible behavior changes

Test plan

  • New tests/test_session_invariants.py — export on/off, double-close, emit-after-close, double-open, identity immutability, snapshot/conformance alignment, atomic export failure
  • Full suite green (pytest)
  • Docs synced: outputs.md, using-aura.md, concepts.md, getting-started.md

Strict closed-session errors, atomic summary+OTel export, in-memory
receipt on export=False, and frozen open_snapshot_hash/declared_rules at open.
@rosspeili
rosspeili merged commit d9dee04 into ARPAHLS:main Aug 29, 2026
6 checks passed
@rosspeili
rosspeili deleted the feat/issue-15-session-invariants branch August 29, 2026 08:15
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.

[Core]: Harden session lifecycle and export invariants

1 participant