docs: document promotion audit sequencing fix and Storage transaction model#7
Closed
cursor[bot] wants to merge 7 commits into
Closed
docs: document promotion audit sequencing fix and Storage transaction model#7cursor[bot] wants to merge 7 commits into
cursor[bot] wants to merge 7 commits into
Conversation
Ship the local-first CLI, schemas, tests, and CI. Slim-repo docs link to canonical flightdeckdev/flightdeck main. OpenTelemetry is optional-only. Also: pytest basetemp under .tmp/pytest for Windows, Python 3.13–3.14 in CI, ruff 0.15.12 aligned with ruff-pre-commit, pre-commit-hooks v5, .gitattributes LF for golden bundle, CHANGELOG 1.0.1 section and empty Unreleased, RELEASE_NOTES v1.0.1 patch notes, README quickstart_smoke first. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
…cstrings (#4) - CHANGELOG.md: add Fixed entry under Unreleased for PR #3 (zero policy sample thresholds were silently ignored due to falsy 'or' fallback; now uses 'is not None' checks) - ledger.py: add docstrings to confidence_label, evaluate_policy, and diff_releases explaining threshold semantics (None vs 0 vs config default), confidence label tiers, constraint fields, and agent-id invariant - models.py: add Policy class docstring explaining the None/0 distinction for min_* threshold fields versus constraint (max_*) fields - schemas/v1/policy.schema.json: regenerated to pick up Policy docstring Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
… model - CHANGELOG.md: add Fixed entry under Unreleased for PR #5 (insert_promotion_record was using connect()/autocommit instead of transaction()/BEGIN IMMEDIATE; concurrent writers could interleave and produce non-contiguous audit_seq; also notes utc_now consolidation into models) - storage.py: add Storage class docstring explaining connect() vs transaction() semantics, the two promotion write paths (insert_promotion_record for policy-fail, commit_promotion for policy-pass), and the audit_seq monotonicity contract - storage.py: add transaction() docstring explaining BEGIN IMMEDIATE semantics and when to use it over bare connect() - storage.py: add insert_promotion_record() docstring distinguishing policy-fail audit-only path from the commit_promotion atomic pointer-update path Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
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.
Docs added/updated
CHANGELOG.mdAdded a
Fixedentry underUnreleasedfor PR #5 (promotion audit sequencing):Storage.insert_promotion_recordpreviously usedconnect()(autocommit) instead oftransaction()(BEGIN IMMEDIATE), allowing concurrent writers to interleave and produce non-contiguousaudit_seqvalues on the policy-fail path.utc_nowconsolidation (removed duplicate instorage.py, now sourced frommodels).src/flightdeck/storage.pyThree targeted docstrings added; no behavior changes:
Storageclass docstring — explains theconnect()vstransaction()split, the two promotion write paths (insert_promotion_recordfor policy-fail,commit_promotionfor policy-pass), and theaudit_seqmonotonicity contract checked byflightdeck doctor.transaction()context manager docstring — explainsBEGIN IMMEDIATEsemantics, when to use it over a bareconnect(), and why it matters foraudit_seqcorrectness.insert_promotion_record()docstring — clarifies this is the policy-fail path (audit record only, no pointer update) vscommit_promotion(atomic audit + pointer update on policy-pass).Codepaths covered
Storage.insert_promotion_record/Storage.commit_promotion/Storage.transaction(src/flightdeck/storage.py)src/flightdeck/cli/main.py— context only)flightdeck doctoraudit-seq check (referenced in class docstring)Key knowledge gaps addressed
connect()(read queries, autocommit) andtransaction()(all writes)audit_seqmonotonicity invariant and how it is maintained under concurrent access