refactor: simplify runtime exports and mission usage snapshots - #163
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mission completion assembled totals and role details through separate ledger queries, so an append between those reads could produce an inconsistent receipt. Build both from one
UsageLedger.records()result and remove the scalar accounting accessors and repeated event normalization.Internal runtime callers now import helpers from their implementation modules. Remove unused private re-exports from the runtime and supervisor facades, retaining the entry points used by daemon configuration and the community vertical package. Flatten the redundant memory protocol inheritance and inline its one-use root resolver.
Net change from dev
e92f27746: 411 fewer lines overall, including 451 fewer production Python lines. Tests retain the existing cost/daemon behavior checks and add a real-ledger regression that appends a record immediately after reading, proving completion totals and detail use one snapshot.Validation: Ruff and
git diff --checkpass. Focused runtime/architecture/cost regressions pass after adapting their import targets;npm run checkpasses all 226 tests; the full Python regression in a fresh environment passes: 11,386 passed, 99 skipped. Documentation: update the runtime maintenance guide with the direct import and completion snapshot paths. CI/workflow: no workflow changes; require the existing Python suite and Linux/macOS/Windows TypeScript/ownership checks before merging. No deployment or service restart is included.