Repository navigation
Review mitigation for the 1c5s/xkr7 batch (nxf 6j6v.1c5s, xkr7) - #56
Merged
Merged
Conversation
The store-free `next` (read::next_active) now ranks a plugin with `related` / `count` / `sum` keys from a RankingGraph on ActiveBoard, by the same evaluation the store path runs. Owner decision 2026-10-11: a key reads every LIVE neighbour (closed and archived count, deleted do not) on both paths. - facade: ActiveBoard::ranking, RankingReads, RankingGraph, Neighbour, next_ranking_reads, with_ranking (the parity oracle); derived.rs split into plan / context fill (store or graph) / finish. A [ranking.next] order reading the rank of a type only [ranking.list] orders is refused on the store-free path until xkr7. - fold-ddb: .adj# entries copy from_id/to_id/kind/lamport/site and a removed flag, kept on edge removes; INDEX_REVISION 2 -> 3 (old streams NotCurrent until refolded); records::with_ranking reads the graph. Table contract unchanged (no new GSI, no new key attribute). - core: EdgeKind and graph::Edge derive Ord. - tests: derived_differential (SQL = Board = fold-ddb on generated boards, determinism, request-count guard, revision-2 refold), facade seam tests for live neighbours and the list-rank refusal. - spec §6/§10.5/§11/§12 amended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016q5uMUkZJQW4fckJoA3FME
A hosted board answers `list` ranked by `[ranking.list]`, derived keys included, as a replica does, and a hosted `next` whose keys read a `[ranking.list]` rank no longer is refused (spec §6, decision §10.4). - fold-ddb: third sparse GSI `typed` (nxf_typed = <stream>#<type>, the type escaped; sort key sk; projection ALL) on every live item row, closed and archived included, kept by refresh_item after the row. Table::query_typed (MemTable, DynamoDbTable, create_table). A type whose partition passes 2,048 bytes is refused at fold time. Ships in index revision 3 with the self-describing .adj# entries (#54, unreleased): no revision 4. records::list_board reads a ListBoard; the graph builder is shared with with_ranking and reads the live items of RankingReads::list_types off the index. - facade: ListReads, ListItem, ListBoard, list_reads, list_board (store oracle), list_board_page, list_board_value; RankingReads::list_types, RankingGraph::listed (additive); next_ranking_reads no longer refuses a next order reading a list-only type's rank. Not paged, as the hosted next: limit cuts, paginate/token are validation. - No new adjacency: the revision-3 .adj# entries carry everything. - tests: list_differential (SQL = Board = fold-ddb for list and next on generated boards with retypes, cross-section ranks, JSON, cost guard, revision refusal), typed index in fold_differential, robustness and dynamodb_local, facade seam tests. - docs: crate table contract, E4 §5.1, spec §6/§9/§11/§12; 1c5s fragment aligned (contract change and lifted refusal). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016q5uMUkZJQW4fckJoA3FME
Mitigates the independent review of PR #55 (.nxf/review/2026-10-11T18-13-12Z.md): - Bounded hosted read cost: an unranked list keeps and cuts on the item rows before any join (ListReads::select, read::list_select, ListBoard::cut); point reads go by BatchGetItem (Table::get_many, 100 keys a request, UnprocessedKeys retried with backoff); request-count guard tests for the untyped list and a ranked list with next + graph. A ranked list still reads its types' whole list scope (spec section 12). - Closed the refold window: Folder::clear(table, until) rewrites the watermark first as a sentinel without revisions; readers answer NotCurrent, then Refolding until the refold reaches `until`. Snapshot import writes the same sentinel first. - records::with_ranking checks the index revision; the revision-2 test reads the stripped entries through it. - An item op whose row would pass 400 KB with its index attributes is refused before it writes; refresh_item's Outcome is surfaced. - present_edges drops entries that do not name their item; typed_items doc; redundant graph_for removed; targeted seen counters; typed index re-create and type None; typed_partition escaping; DynamoDB Local coverage of list_board / with_ranking including a multi-page hub. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016q5uMUkZJQW4fckJoA3FME
This was referenced Oct 11, 2026
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.
Stacked on #55 (→ #54); this PR is the one to merge — it contains all three.
Mitigates the independent review of #55 (
.nxf/review/2026-10-11T18-13-12Z.md).Mitigation
ListReads::select,read::list_select,ListBoard::cut, andlist_board_pageuses the total counted before the cut. Only the page reads joins. Point reads go through the newTable::get_many:BatchGetItem, 100 keys a request,UnprocessedKeysretried with backoff. Guard tests:an_unranked_list_costs_its_page_not_the_stream(300 closed items add no requests) anda_ranked_list_with_next_and_a_graph_costs_what_its_scope_holds. A ranked list still reads its types' whole scope, per spec §12; this is documented in E4 §5.1 and spec §6. The hard per-call budget is not built: filed as 6j6v.wq9e.Folder::clear(table, until)first rewrites the watermark as a sentinel with no revisions. Readers answerNotCurrent, thenRefoldinguntilfolded_through >= until. Replay-safe, because nothing is written to end the window. Snapshot import writes the sentinel first. Test:a_refolding_stream_is_refused_from_its_clear_until_the_refold_reaches_the_head. Changelog wording fixed.with_rankingskips the revision check; hollow rev-2 test (Integrity #3, Code #4, Test #1)check_currentnow runs at the start ofwith_ranking. The rev-2 test asserts the refusal, and also that the stripped entries read as an empty graph under a false rev-3 watermark while the store has edges.refresh_itemdropsTooLarge(Integrity #4 · Medium)Folder::foldweighs each item row it writes: the stored row, plus this op's writes, plus its index attributes. Too large meansFolded::Refusedbefore anything is written.refresh_item'sOutcomeis reported byboard::afterandreindex. Test:an_item_with_no_room_for_its_index_attributes_is_refused_rather_than_left_off_an_index.typed_partitionescaping untested (Test #2)a_typed_partition_escapes_the_type_so_no_stream_and_type_share_one: no cross-stream collision, and a type of#characters is refused once escaped.typed_itemsdoc overstates the guard (Code #2, Integrity #8, Test #3)an_item_whose_typed_attribute_lags_its_row_is_not_listed_under_its_old_type.Cargo.tomldescription.graph_for(Code #5)debug_assert, sincenext_activealready validated coverage.contributes_tointo a listed item, archived items of a graph list type (now asserted out of scope), and cut boards. Three unranked queries added.typed: re-create, type set to None (Test #6)typedtest, with the store as the oracle.present_edgestrusts the copy (Integrity #5)is_currentdowngrade (Integrity #6)folddoc, E4 §5.1 and the changelog. Not enforced in code:is_currentstays a bool, and an older build cannot know a newer revision's meaning.the_ranked_list_and_the_ranking_graph_read_back_as_from_memory, anda_hub_whose_adjacency_spans_query_pages_reads_every_edge(450 entries of about 2.9 KB, more than 1 MB). The recorder also checks theBatchGetItemcount.Follow-ups filed (P3): 6j6v.wq9e (per-call request budget), 6j6v.jtfy (
snapshot::importshould reportTooLargerows and items left off an index), 6j6v.4r15 (batchactive_board's point reads).Tests run locally
nxs-fold-ddb lib, chat_and_memory, derived_differential, fold_differential, list_differential, records_differential, robustness: all pass. Facade derived_ranking, list_query, next_query: all pass.
cargo check -p nxs-fold-ddb --features dynamodb --tests,cargo xtask docs check,cargo xtask changelog check origin/main,cargo fmt --all. The DynamoDB Local tests run in CI.🤖 Generated with Claude Code
https://claude.ai/code/session_016q5uMUkZJQW4fckJoA3FME