Skip to content

Name the selected ref in release-tag repairs; refuse non-object pointers - #308

Draft
MaxGhenis wants to merge 3 commits into
mainfrom
lane/release-tags-ref-and-pointer
Draft

MaxGhenis wants to merge 3 commits into
mainfrom
lane/release-tags-ref-and-pointer

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

Fixes #303, #296, #297 and #302, all from review round 2 of #294 or the reviews before it.

New tests: test_landed_repair_names_the_selected_ref, test_the_cli_refuses_a_non_object_pointer (three cases) and test_scratch_git_ignores_caller_routing_and_config.

A Codex lane (GPT-6.2 Sol) wrote the patch, and Claude read it against main before applying it. The tests were not run locally; CI runs pytest -m "not slow". ruff check and ruff format --check pass on the changed files.

🤖 Generated with Claude Code

- The landed planner's manual-repair reason names the selected --ref in
  both clauses instead of always saying main (#303).
- A data pointer that parses to a non-object JSON value is refused with
  a ReleaseTagError naming the path and commit, instead of raising
  AttributeError (#296).
- The test helpers run scratch Git with inherited GIT_* routing cleared
  and global and system config disabled (#297).
- Six release-tag tests now catch the regressions review round 2 of #294
  listed (#302).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policybench-site Ready Ready Preview Dec 3, 2026 5:15am UTC

Request Review

Fixes from review round 1:
- The no-board reason names the ref the planner read (not always main),
  and the module docstring describes board lookup on the selected ref
  (#303).
- release-commit turns a malformed committed pointer into SystemExit, as
  seal-release does; the malformed-pointer test covers both subcommands
  through both CLI entry points (#296).
- Reads of the real checkout use Git's normal configuration, so a global
  safe.directory entry still applies; only scratch repositories use the
  sanitized environment.
- Scratch-repository tests also sanitize the environment production Git
  inherits, so a caller's GIT_DIR or GIT_TRACE can't redirect them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes from review round 2:
- The landed-repair reason now says what commits on the selected ref
  named at or before the cutoff and after it, so a rollback (A, then B,
  then A again) is no longer described as the ref naming other bytes now.
  A tag outside the cutoff's history is described that way instead of as
  "after" the start.
- plan_tag's ref defaults to None; without one, the no-board reason
  refers to "the supplied history" instead of assuming origin/main.
- A committed pointer that json.loads cannot decode (an integer past
  Python's digit limit, nesting past the recursion limit) raises
  ReleaseTagError with the path and commit, not a traceback.
- Scratch Git sets core.excludesFile and core.attributesFile to
  os.devnull and GIT_ATTR_NOSYSTEM=1, so a default ignore or attributes
  file cannot drop the pointer or normalize the CRLF fixture.
- The malformed-pointer matrix covers seal-release --live and both new
  decode failures through both CLI entry points.
- The real-checkout test clears Git routing and tracing variables (keeping
  GIT_CONFIG*) and sets GIT_NO_LAZY_FETCH=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 1cf1a272 Deployed Dec 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant