Skip to content

docs(dev): specify the three-chain hash rollout (ITL-1559) - #632

Merged
eywalker merged 7 commits into
mainfrom
eywalker/itl-1559-design-what-a-captured-source-stands-for
Nov 29, 2026
Merged

eywalker merged 7 commits into
mainfrom
eywalker/itl-1559-design-what-a-captured-source-stands-for

Conversation

@eywalker

@eywalker eywalker commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

ITL-1559. Related: ITL-1442, ITL-1427, ITL-1470, ITL-1506, ITL-1554, ITL-1560 and ITL-1590.

Updates the three-chain hash specification with the design decisions recorded on 2026-11-28. The PR changes one file under docs/dev/specs/.

  • pipeline_hash describes schemas and steps and determines structural storage paths and system-tag names. content_hash combines it with source_chain for stored rows and record ids. node_hash combines it with name_chain for graph keys that survive rebinding.
  • The implementation sequence introduces the chains alongside existing hashes, gives context-taking pods their own pipeline hash, fixes commutative input ordering and tied joins, switches graph keys, rewrites saved jobs, switches the stored content hash, then lifts both two-slot refusals and shares stored rows through write-if-missing.
  • The switch follows PR 609 and requires approval of the exact golden changes. The prototype moved 104 of 2,504 entries, or 106 with the derived-source additions. Data-tag pins follow the switch, and v1 hashes and stored layouts freeze with 0.4.0.
  • The specification records PR 633's step 1 limits, including its use of source names where the design calls for source labels. It also documents PR 634's one-time redelivery from upgraded live jobs and its saved-job readback.

Checks

  • uv run python scripts/design_issues.py --check passed.
  • uv run pytest tests/test_docs/test_site_content.py -q passed (64 tests).
  • uv run ruff format --check . passed.

Summary by CodeRabbit

  • Documentation
    • Added a design specification for a three-part identity model covering pipeline structure, source bindings, and slot-name chains.
    • Documented hash inputs, ordering, unbound slots, rebinding, and saved-job behavior, with examples and implementation considerations.

Inventory, golden move list, implementation plan and open questions for the
structure, source and name chains. No production code changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This change adds a design specification for ITL-1559’s three-chain identity model. It defines hash inputs and behavior, describes affected consumers and storage, and lists implementation steps, acceptance criteria, alternatives, and open questions.

Changes: Three-chain identity model

Layer / File(s) Summary
Hash model and implementation plan
docs/dev/specs/itl-1559-three-chain-hash.md
The specification defines pipeline_hash, content_hash, and node_hash, including their inputs and handling rules. It also describes proposed changes, affected consumers, prototype results, implementation steps, and acceptance criteria.

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 8fcda

This is a documentation-only change that records design decisions for the three-chain hash model. It does not alter runtime behavior, and no actionable merge-blocking risk was found.

Architecture risk: Low · up to 8fcda

The change affects 1 source area.

Changed areas: docs

Review details

Systems and components

  • observed — 1 changed file mapped to docs.

Before / after behavior

  • observed — Modified behavior in docs/dev/specs/itl-1559-three-chain-hash.md: Adds the ITL-1559 design specification, covering the three hash definitions and their inputs; traversal, ordering, leaf rules, and step 1 constraints; proposed pipeline-hash and storage changes; affected consumers; source-registration and shared-storage rules; prototype golden-value results; implementation steps and acceptance criteria; alternatives and unresolved questions; and rebinding, saved-job, and cost details.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: it adds a design specification for the three-chain hash rollout under ITL-1559. The only changed file, docs/dev/specs/itl-1559-three-chain-hash.md, is a new design spec for…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: it adds a design specification for the three-chain hash rollout under ITL-1559. The only changed file, docs/dev/specs/itl-1559-three-chain-hash.md, is a new design spec for the three-chain identity model (pipeline_hash, content_hash, node_hash). The title is concise, specific, and follows the conventional docs(scope) prefix. It does not describe implementation work, which the PR does not include.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 146fcbf and 8fcda34.

Files selected for processing: 1

  • docs/dev/specs/itl-1559-three-chain-hash.md

Limit details: You’ve used the included review currently available. Your 99 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Recent review details

Additional context used

Code guidelines: 1

CLAUDE.md — auto-discovered
Path-based instructions: 2

Source excerpt: `docs/` is the only source.

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/dev/specs/itl-1559-three-chain-hash.md
Source excerpt: Documents written during development are kept in the repository, under `docs/dev/` (developer, November 16, 2026; ITL-1169): Specs go in `docs/dev/specs/`, plans in `docs/dev/plans/`, and the scripts and evidence they cite i...

CodeRabbit inference engine (CLAUDE.md)

Files:

  • docs/dev/specs/itl-1559-three-chain-hash.md
Additional comments: 4

docs/dev/specs/itl-1559-three-chain-hash.md: 4

326-328: Data Integrity & Integration

The comment's central premise, that one invocation can produce multiple stored results for one instance, is contradicted. Each processed input yields one result, which gets one record keyed by that result's id, and results commit before the records that depend on them. A failed run can leave some instances written. A retry then finds no record for the unwritten instances and computes them. It does not skip them. The reported concern does not survive in this form, so no correction is supplied.

323-326: Data Integrity & Integration

Scope the sharing rule for context-taking pods before DQ1 applies to them.

DQ1 shares stored rows between nodes with equal content_hash. The content_hash does not include the invocation context. A context-taking pod passes pipeline_run_id to its callable, so a callable whose output depends on that value can return different results for the same content_hash. The spec does not state whether DQ1 covers these pods. Add a rule that either excludes context-taking results from cross-run sharing or includes the context value that affects output in the stored key.

216-218: Data Integrity & Integration

The concurrent-sink race does not occur on the async path.

For two sink nodes over one source in one run, the completion check, delivery, and completion write run as one synchronous step inside each task. No other task on the event loop can interleave between the check and the write. A second task for the same entry either runs after the first write and skips delivery, or it runs before the first task starts and is the first delivery. The specified single-delivery result holds for this case.

323-325: Data Integrity & Integration

The comment's premise fails for the ordinary cache read. Within one pipeline, the one-restriction rule refuses two restrictions on the same source identity before any write, and an ordinary read returns only the entries for the branch's own input instance IDs. The restriction therefore cannot expose another branch's excluded rows through that path. The unscoped all-entries load in cache-only mode reads no source, so it does not bear on a restriction difference.

@eywalker eywalker changed the title docs(dev): three-chain hash design for slot identity (ITL-1559) docs(dev): specify the three-chain hash rollout (ITL-1559) Nov 28, 2026
@eywalker
eywalker marked this pull request as ready for review November 28, 2026 22:41
@eywalker

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Posted by a Claude Code agent on behalf of @eywalker.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@eywalker
eywalker merged commit 3e27cac into main Nov 29, 2026
10 checks passed
@eywalker
eywalker deleted the eywalker/itl-1559-design-what-a-captured-source-stands-for branch November 29, 2026 00:05
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.

1 participant