[Agentic] Implementation plan: hashing substrate (merge/concatenate roadmap row 1) - #7275
Merged
Merged
Conversation
Attribution should say who did the work. The pull request record already shows who authored and reviewed it, so crediting the human in the changelog as well overstates their hand in it. Records the rule in AGENTS.md and applies it to the two news fragments from SciTools#7274, which are merged but unreleased. The ``:user:`` role resolves to https://github.com/%s, and github.com/claude is Anthropic's own account, so the rendered link is correct. Co-Authored-By: Claude Opus 5 <[email protected]>
Covers row 1 of the merge/concatenate roadmap: moving the array hashing machinery out of _concatenate.py into a new private _combine_common.py. Records the convention that a plan ships as its own pull request, ahead of the implementation it describes. A reviewer opening the implementation pull request should see a diff they can hold in their head; a plan bundled alongside is not evidence about the change, and makes a small diff look like a large one. Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## greenfield #7275 +/- ##
=============================================
Coverage ? 90.35%
=============================================
Files ? 93
Lines ? 25816
Branches ? 4796
=============================================
Hits ? 23327
Misses ? 1709
Partials ? 780 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Three corrections, all found by executing the plan rather than reading it. The import block was wrong. `from __future__ import annotations` makes `Mapping` annotation-only in Ruff's eyes, so `TC003` requires it behind `TYPE_CHECKING`; `_concatenate.py` has no `__future__` import, so the rule never fires there and copying the import across unchanged fails lint. The move is not quite mechanical. Dropping the underscore from `_array_id` collides with three local bindings inside `compute_hashes` itself, not just the five call sites the plan already anticipated in `_concatenate.py`. Spell out the three, and say why the exception to "do not otherwise touch the moved code" is narrower than it looks -- every one of the eight renames exists only to clear the unprefixed name's path, so conceding decision 6 retires all of them at once. Verification 1 therefore no longer expects an empty diff. It expects two hunks and three lines, which is a stronger check than "identical": it names what may differ instead of asserting that nothing does. The `\b` anchors stay, with an accurate reason -- they change nothing over lines 305-541, but protect `bound_array_id` if the range is ever widened. Co-Authored-By: Claude Opus 5 <[email protected]>
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.
Description
Note
This is agentic work, authored by Claude (Opus 5) working with @bjlittle.
It is labelled
Agenticso that it is easy to find, or to filter out.Follow-up to #7274, which banked the merge/concatenate design spec. This
pull request carries the implementation plan for row 1 of that spec's
roadmap (§6) — moving the array hashing machinery out of
iris._concatenateinto a new private
iris._combine_common, per §5.1.It deliberately contains no implementation. The code change itself follows in
a separate pull request.
Why the plan ships on its own
A core developer opening the implementation pull request should see a diff they
can hold in their head: a module moved, an import repointed, a test added. A
four-hundred-line plan describing how an agent was told to do it is not evidence
about that change — it is homework handed in alongside the work, and it makes a
small, easily approved diff look like a large one.
So this becomes the standing convention for the programme, recorded in
docs/src/developers_guide/plans/README.mdand in §6 of the spec: a planships as its own pull request, ahead of the implementation it describes. The
implementation pull request then carries only the change under review, and can
be reviewed on its merits by someone who has never read the plan and does not
need to.
Plans are tracked in the repository for provenance but are excluded from the
Sphinx build (
exclude_patternsindocs/src/conf.py), so nothing here ispublished.
Also in here
:user:bjlittle; the work was Claude's, so they now credit `:user:`claude.Attribution should say who did the work — the pull request record already shows
who authored and reviewed it. The
:user:role resolves tohttps://github.com/%s, and github.com/claude is Anthropic's ownaccount, so the rendered link is correct. The rule is recorded in
AGENTS.md.Both fragments are merged but unreleased, so this costs nothing.
What the plan actually says, for anyone curious
Three tasks. The move itself is atomic — creating the new module without
removing the original duplicates the definitions, and removing the original
first breaks
_concatenate. There is exactly one non-mechanical hazard, whichthe plan calls out:
_concatenate.py:604and:1230assign to a local variablenamed
array_id, so once the moved function loses its underscore prefix thatlocal shadows it and the right-hand-side call raises
UnboundLocalError. Ruffdoes not flag it and the type checker does not flag it; only the tests do.
The plan also adds a test for the property that justifies the module's
existence:
_combine_commonmust import nothing from Iris at runtime, which iswhat makes the merge-side import risk-free later. That check is static, over the
module's AST, because
import iris._combine_commonexecutesiris/__init__.pyfirst and so
sys.modulescannot distinguish the substrate's own imports fromthe package's.
Checklist