Repository navigation
Conversation
- --heads-out and --publish-heads record {hash, seq, at}; a missing
published head is accepted only when an anchor of the chain has
first_kept_seq > seq or anchor_hash == hash (no schema change).
- 0.1.0 heads files (bare hashes) are refused with exit 2; bare hashes
passed to the API are excused only by their own anchor.
- An anchor past the chain's first link is reported as anchor_after_start;
an emptied chain reports its last anchor as its head.
- DoctrineTransactionRunner: a configured entity manager name that
resolves to the registry's default manager is shared, so release()
and refuseForeignChanges() apply (audit ST Info).
- UPGRADING: 0.1.0 is the first release (composer require).
|
@coderabbitai review |
…t ST-D1b)
- A missing head with its seq is excused only when seq is below the
chain start (first link, or the last anchor's first_kept_seq for an
emptied chain); the anchor_hash shortcut is gone for such heads.
- Exports record {hash, seq} in chain_heads; bare hashes (0.1.0 rows,
API callers) keep the weaker 0.1.0 rule, documented in UPGRADING.
- The genesis is a head only with seq 0.
- Anchors with first_kept_seq < 2 are reported as anchor_seq_invalid.
- Regression tests for probes c and c2 on SQLite, MySQL, MariaDB, PG.
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.
Fixes the remaining findings of audit ST (Appendix ST delta) for 0.1.1.
ST-D1 (Low): published heads after a purge
--heads-outand--publish-headsnow write{hash, seq, at}per chain (VerificationReport::$headLinks).first_kept_seq > seq, oranchor_hash == hash. No column added: both are already onworking_time_chain_anchor(no migration; noted in UPGRADING).--heads-out(the safer option: withoutseqa purge cannot be told from a removed tail). Bare hashes passed to the PHP API are excused only by their own anchor.anchor_after_start(a purge only removes a prefix), so a forged anchor past the published head no longer excuses a removed tail while links remain. A chain the purge emptied reports its last anchor as head.PurgeTest::testAHeadPublishedAfterAPurgeStillCatchesARemovedTail(SQLite, MySQL, MariaDB, PG): real purge →--heads-out→ delete the last workday's links, segments and row with the purge flag →verify --headsreports NOT intact (published_head_missing, exit 1).Info: default EM by name
DoctrineTransactionRunnertreats a configureddoctrine.entity_managerthat resolves to the registry's default manager as shared, sorelease()andrefuseForeignChanges()apply. Tests: unit (defaultvs private name) andHostKindsTestparametrised withentity_manager: default.Docs
UPGRADING "To 0.1.0" now says first release (
composer require); Unreleased section with the heads-file migration; CHANGELOG[Unreleased]Fixed; SECURITY/USAGE updated.Local results
🤖 Generated with Claude Code