Skip to content

status: the fourth layer — the shape pin: copies re-hashed against contracts/shape-pin.yaml, the mirror checked, the pin read against the standard's main; and the fork layer's review fixes - #12

Merged
brettheap merged 3 commits into
mainfrom
feat/status-shape-pin
Sep 11, 2026

Conversation

@brettheap

@brettheap brettheap commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Ruling: Brett Heap, 2026-09-11, verbatim: "next layer: shape-pin drift" — the fourth of the layers named when status landed (#9), after the local one (#9), --fetch (#10) and the fork (#11). Against main; the stack is flat again.

What it reads

Every assembly root and family holder carries contracts/shape-pin.yaml — a COPY PIN, in the standard's own words: the scaffold copied a small set of files out of openRepoShape (the Makefile, the validators, the bootstrap, the workflow) so a project runs its own gate with no upstream mounted, and the pin records the commit they came from plus a sha256 per copy. Three things can be out of sync with it, and each is read, for holder and root rows:

  root   main   ~/projects/Atlas
    shape: pinned at 0fa73b7 of opensoft/openRepoShape; 11/12 copies match their digests; against opensoft/openRepoShape main per a clone under the projects directory
    - shape copy scripts/validate-pins.py edited in place: its sha256 is not the one contracts/shape-pin.yaml records (drift: carry the change upstream, never re-digest)
    - shape pin 0fa73b7 is 4 commit(s) behind opensoft/openRepoShape main (per the clone at ~/projects/openRepoShape, as of its last fetch): update-shape.py check --root ~/projects/Atlas
  1. The copies. Every files: row is re-hashed with whatever sha256 the machine has (GNU sha256sum, the shasum a Mac ships, or openssl). A digest that differs is DRIFT and the finding names the standard's exit — carry the change upstream, never re-digest. A missing copy is named. This is the same check the root's own scripts/validate-pins.py makes on every pull request, read here across the estate without running the validator, which also asks lockstep questions a report about the shape does not.
  2. The mirror. project.yaml (or family.yaml) carries a shape: block mirroring the pin's commit; update-shape.py moves both together, so two different commits is a half-done update.
  3. The pin against the standard's main. From a clone of openRepoShape under the projects directory when there is one — found by its origin's slug, the way --repo finds an estate — read from local refs, as of that clone's last fetch; else, under --fetch, from GitHub's compare endpoint, once. Behind names update-shape.py check --root <root>. A pin main never contained is a finding too: the standard squash-merges, and a branch commit is orphaned the moment its pull request lands. With neither source, the note says currency was not read, so silence is never mistaken for current.

A root with no contracts/shape-pin.yaml says nothing here. Legs carry no pin and are not asked.

The fork layer's review, folded in

The independent review of #11 finished after #11 had merged; its findings are fixed here rather than in a separate PR, because this layer builds on the same gh machinery. The two that mattered:

  • The origin host was matched as a substring. *github.com* admitted github.company.com (GitHub Enterprise), notgithub.com, github.com.evil.example — and the question went to github.com regardless, with the person's token, about a repository that was never there; a 404 then silenced the run (below). Now is_github_origin parses the host out of every spelling git accepts and compares it to github.com, and the one gh call pins --hostname github.com so a GH_HOST in somebody's environment cannot redirect it.
  • One repository's failure silenced the whole run. A 404 — a repository the token cannot see — set GH_STATE=failed, and every later row printed in sync … clean with the one trace under a different row, possibly a whole estate earlier in a sweep. Now only gh exit 4 (not logged in, true of every repository) or three consecutive failures settle the run; a single failure is said on its row as …; the other repositories are still asked, and they are.

Everything status asks GitHub now goes through one function, gh_api_line: host pinned, GH_DEBUG cleared and the LAST line parsed (a stray stderr trace read as the payload had turned a fork into "clean"), counts checked as numbers before they are printed, the failure policy in one place. The hygiene rule now holds gh to that function and gh_ready's command -v gh. Smaller items from the same review: a ref that never existed is there is no <remote>/<branch>, not nothing new; after a failed upstream fetch the row no longer advises --fetch; the header, usage and both documents say the write covers refs/remotes/<remote>/* for both remotes and that the two GitHub questions are the estate commands' only use of gh (the installer has its own).

Docs

README.md 221 -> 230, AGENTS.md 122 -> 131, caps raised in dated entries. AGENTS.md rule 4 says what an assistant must never do about a drift finding — re-digest the copy, or edit the pin — and that "currency not read" means neither source was there, not that the pin is current.

Tests

202 -> 211. Shape pin: a fake standard (a bare repository three commits deep, plus a branch commit main never had), a pin file with real digests and a mirror block; a pinned root with matching copies and the "not read" note; an edited and a missing copy, both dirty paths too; a mirror out of step; the pin read against a clone of the standard under projects/ — two behind, at the tip (nothing to say), on the branch commit (not on main); GitHub asked once under --fetch with no clone, the exact call asserted; a root without a pin says nothing. Fork fixes: a 404 on one repository leaves the leg asked and says so; seven origin spellings — four that merely contain github.com never asked, [email protected]:, ssh://[email protected]:22/ and https://[email protected]/ asked; a github origin WITH an upstream remote read locally, gh never called.

bash -n status passes; shellcheck status reports only SC2317. python3 -m pytest tests -q: 211 passed locally with the submodule initialised.

Not merged

Opened for review. An independent review of the shape layer was still running when this was opened; anything it finds lands as a follow-up commit here before the merge. workBenches re-vendors all four after this lands.

🤖 Generated with Claude Code

Summary by Sourcery

Add the shape-pin layer to status and harden GitHub-backed fork checks while documenting and testing the expanded estate reporting.

New Features:

  • Add shape-pin drift reporting for project roots and family holders, including copied-file integrity, manifest synchronization, and currency against the standard repository’s main branch.
  • Support local standard clones and single GitHub compare checks under --fetch, with explicit reporting when pin currency cannot be read.
  • Make GitHub-origin detection and API access safer and centralize failure handling so one repository error does not suppress checks for others.

Bug Fixes:

  • Prevent GitHub Enterprise, lookalike, and malicious hostnames from being treated as github.com origins.
  • Ensure missing refs, failed upstream fetches, and repository-specific GitHub failures produce accurate findings instead of misleading clean or actionable output.

Enhancements:

  • Refine fork checks to prefer local upstream data and preserve per-repository status across partial failures.
  • Document the shape-pin layer, drift remediation rules, currency semantics, bounded writes, and GitHub usage.

Documentation:

  • Update README.md and AGENTS.md with shape-pin behavior, drift handling, source lookup, and assistant guidance.

Tests:

  • Expand status coverage for shape-pin integrity, mirror synchronization, local and GitHub currency checks, caching, missing pins, family holders, and fork-layer regressions.

…contracts/shape-pin.yaml, the mirror checked, the pin read against the standard's main; and the fork layer's review fixes

Brett Heap's RULING of 2026-09-11, verbatim: "next layer: shape-pin drift".

Every assembly root and family holder carries contracts/shape-pin.yaml, a
COPY PIN in the standard's own words: the openRepoShape commit its copied
shape files were cut from and a sha256 per copy. Three things are read
against it, for holder and root rows:

1. THE COPIES. Every `files:` row is re-hashed (sha256sum, the shasum a Mac
   ships, or openssl — chosen once). A digest that differs is DRIFT, and the
   finding names the standard's exit: carry the change upstream, never
   re-digest. A missing copy is named. A note line says what is pinned and
   how many copies matched.
2. THE MIRROR. project.yaml's (or family.yaml's) `shape:` block naming a
   commit other than the pin's is out of step; update-shape.py moves both.
3. THE PIN AGAINST THE STANDARD'S MAIN. From a clone of openRepoShape under
   the projects directory when there is one — found by its origin's slug,
   the way --repo finds an estate — read from local refs as of its last
   fetch; else, under --fetch, from GitHub's compare endpoint. Behind names
   `update-shape.py check --root <root>`; a pin main never contained is a
   finding too, because the standard squash-merges and orphans a branch
   commit. With neither the note says currency was not read.

THE FORK LAYER'S REVIEW (of #11, which had merged) lands here too. Two
mattered: the origin host was matched as the SUBSTRING github.com, so a
GitHub Enterprise or lookalike host would have been asked about on
github.com with the person's token (now `is_github_origin` parses the host,
and the one gh call pins `--hostname github.com`); and one repository's 404
set GH_STATE=failed for the whole run, so forks nobody asked about read as
clean (now only gh exit 4 — not logged in — or three consecutive failures
settle the run; a single failure is said on its row and the others are still
asked). Every gh call now goes through `gh_api_line`, which also clears
GH_DEBUG and parses the LAST line, so a stray stderr line cannot read as the
payload; GitHub's counts are checked as numbers; a ref that never existed is
"there is no <remote>/<branch>", not "nothing new"; after a failed upstream
fetch the row no longer says "never fetched (--fetch asks it)"; the docs say
the write covers refs/remotes/<remote>/* for both remotes and that the two
GitHub questions are the estate commands' only use of gh.

Tests 202 -> 211: a pinned root with matching copies and the "currency not
read" note; an edited and a missing copy; a mirror out of step; the pin read
against a fake standard cloned under projects (behind, at the tip, on a
branch main never had); GitHub asked once under --fetch with no clone, the
exact call held; a root without a pin says nothing. For the fork fixes: a
404 on one repository leaves the leg asked; seven origin spellings, four
that merely contain github.com never asked and three real ones asked; a
github origin WITH an upstream remote read locally, gh not asked. The
hygiene rule now holds gh to gh_api_line and gh_ready's `command -v gh`.
README 221 -> 230, AGENTS.md 122 -> 131, caps raised in dated entries.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 11, 2026 03:19

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 hour and 44 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR adds the fourth status layer: estate-wide validation of copied openRepoShape files, their mirrored commit pin, and currency against the standard’s main, while consolidating and hardening GitHub access and documenting the behavior with comprehensive tests.

Flow diagram for shape-pin drift validation

flowchart TD
    A["Estate root or family holder"] --> B{"contracts/shape-pin.yaml exists?"}
    B -- "No" --> Z["No shape finding"]
    B -- "Yes" --> C["Hash each listed shape copy"]
    C --> D{"Copy missing or digest differs?"}
    D -- "Yes" --> E["Report drift; carry change upstream"]
    D -- "No" --> F["Compare project shape mirror"]
    E --> F
    F --> G{"Mirror commit differs from pin?"}
    G -- "Yes" --> H["Report mirror out of step"]
    G -- "No" --> I["Read standard main when clone or --fetch source exists"]
    H --> I
    I --> J{"Pin behind main?"}
    J -- "Yes" --> K["Report update-shape.py check --root <root>"]
    J -- "No or unavailable" --> L["Report current or currency not read"]
Loading

File-Level Changes

Change Details Files
Add estate-wide shape-pin drift reporting for roots and family holders.
  • Read and validate each pinned copy’s SHA-256, including missing and edited files.
  • Check the project/family shape mirror against the contract pin.
  • Compare pinned commits with openRepoShape main via a local projects clone or one GitHub compare request under --fetch.
  • Report unapplied, stale, orphaned, or unread currency with actionable update-shape.py guidance; leave unpinned roots and legs unaffected.
status
tests/test_status_command.py
Centralize and harden all GitHub API access used by status.
  • Route fork and shape checks through gh_api_line with a fixed github.com hostname, sanitized debug output, numeric response validation, and shared failure handling.
  • Parse Git origins by hostname rather than substring and recognize supported HTTPS and SSH spellings.
  • Keep processing later repositories after a repository-specific failure while treating authentication failure or repeated failures as run-wide failures.
  • Clarify missing refs and fetch-failure messaging.
status
tests/test_status_command.py
Update repository hygiene tests and user-facing documentation for the fourth status layer.
  • Document shape-pin semantics, currency sources, drift remediation, GitHub usage, and the bounded --fetch write.
  • Expand structural tests to enforce the single API call site, pinned host, documentation requirements, and revised line caps.
  • Add coverage for shape copies, mirror mismatch, local/GitHub currency checks, orphan commits, no-pin behavior, origin parsing, and per-repository 404 handling.
README.md
AGENTS.md
tests/test_repo_hygiene.py
tests/test_status_command.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved validation and error-handling issues remain in status.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds shape-pin drift detection to status and hardens GitHub fork checks.

Changes:

  • Validate copied files, mirrors, and pin currency.
  • Centralize GitHub API handling and failure behavior.
  • Expand tests and update documentation.
File summaries
File Description
tests/test_status_command.py Tests shape-pin and GitHub behavior.
tests/test_repo_hygiene.py Updates hygiene checks.
status Implements shape-pin and GitHub logic.
README.md Documents the shape-pin layer.
AGENTS.md Adds shape-pin guidance.
Review details

Suppressed comments (3)

status:1326

  • The new dispatch has separate holder/family.yaml and root/project.yaml paths, but the added shape tests cover only a standalone root; the existing family test never creates a holder or member shape pin. A regression in either family path would pass unnoticed. Add a family fixture with matching and drifted pins and assert both holder and member output.
            if [ "$label" = holder ]; then
                read_shape "$path" family.yaml
            else
                read_shape "$path" project.yaml

status:1270

  • With --fetch, this calls GitHub before checking for the local openRepoShape clone. That violates the documented precedence (use the clone's local refs when one exists, and use GitHub only when there is no clone), causing unnecessary authenticated network calls and potentially reporting GitHub's answer instead of the clone's last-fetch view. Check shape_currency_from_clone first and fall back to GitHub only when it cannot answer.
        if [ "$FETCH" -eq 1 ] && ask_github_shape_pin "$root" "$commit" "$source"; then
            currency="; against $source main per GitHub"
        elif shape_currency_from_clone "$root" "$commit" "$source"; then
            currency="; against $source main per a clone under the projects directory"
        else
            currency="; currency not read (no clone of $source under the projects directory; --fetch asks GitHub)"

status:1239

  • source_repository is required by the shape-pin manifest, but an absent value is silently rendered as an unnamed source and can still produce exit 0 after the copy checks. That leaves a pin whose upstream identity cannot be checked looking clean/current; record missing source_repository as a finding while continuing to check the listed files.
    commit=""; yaml_scalar "$pin" commit && commit="$YAML_VALUE"
    source=""; yaml_scalar "$pin" source_repository && source="$YAML_VALUE"
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread status
Comment on lines +1244 to +1251
while IFS=$'\t' read -r path digest; do
[ -n "$path" ] || continue
total=$((total + 1))
if [ ! -f "$root/$path" ]; then
finding "shape copy $path is missing; contracts/shape-pin.yaml names it (update-shape.py check --root $root)"
continue
fi
actual="$(file_sha256 "$root/$path")"
Comment thread status
IFS=$'\037' read -r behind ahead <<<"$GH_LINE"
if ! is_count "$behind" || ! is_count "$ahead"; then
finding "shape: GitHub's compare of pin $(short "$commit") with $source main was not two counts; not read"
return 0
Comment thread status Resolved
…ion per pin, the source's default branch read, and the note made truthful

The independent review of this layer found the order inverted under
--fetch: GitHub was asked before a clone of the standard under the projects
directory was consulted, the reverse of what the header, usage, README and
AGENTS.md all say — and, since a family's holder and members carry the same
pin, the identical question was asked once per root, spending gh_api_line's
three-failure budget on one pin and then silencing the fork check for every
remaining repository with no line on its row. Now the clone is read first,
GitHub only under --fetch when no clone answered, and the answer about one
pin (and the source's default branch, once per source) serves every root
that carries it, each still naming its own --root.

Also from the review: the source's default branch is read (the clone's
origin/HEAD, or GitHub's default_branch) rather than assumed to be main,
because source_repository is whatever a fork of the standard was named; the
"currency not read" note no longer advises --fetch when --fetch was on and
GitHub failed, and no longer claims there is no clone when there is one that
never fetched its default branch; a manifest with no `shape:` block beside a
pin is out of step, as update-shape.py itself refuses it; the sha256 tool is
chosen once, outside the subshell that ran it per file; a copy the tool could
not read is distinguished from no tool at all; the `\` prefix sha256sum puts
before an escaped file name is dropped; a trailing comment on a hand-edited
path row is not part of the path; and fake_gh can 404 a whole prefix.

Tests 211 -> 218: the clone read before GitHub under --fetch (gh never
called); one pin on two roots is one compare; a 404 on the shape question
leaves the leg's fork check asked and the note says why currency was not
read; a manifest without a mirror; the family holder's family.yaml mirror
(the arm no test had run); a tracking branch no remote has, after the fetch
("there is no origin/develop", "after the fetch: upstream has no branch");
a failed upstream fetch not blamed on the person. README 230 -> 232,
AGENTS.md 131 -> 133.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 11, 2026 03:44
@sonarqubecloud

Copy link
Copy Markdown

@brettheap
brettheap merged commit 9f369d9 into main Sep 11, 2026
7 checks passed
@brettheap
brettheap deleted the feat/status-shape-pin branch September 11, 2026 03:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved moderate and critical findings remain in shape-pin handling, failure caching, path validation, documentation, and the hygiene line-count check.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (10)

AGENTS.md:80

  • Rule 4 still says at lines 70–72 that status --fetch runs git fetch --prune origin only, while this addition says upstream is fetched too. Because this is the operator guidance an assistant is instructed to follow, reconcile the earlier sentence so it does not understate the remotes refreshed by --fetch.
   named `upstream` from local refs (`--fetch` fetches it too), and, with no
   such remote and only under `--fetch`, an origin whose host is github.com
   is asked about with `gh api` (his RULING of the same day, "next layer:
   fork against upstream") — read-only, and with the shape check below the

README.md:45

  • The README still describes status --fetch as fetching only origin at lines 32–34 and in the usage example, but this new paragraph says forks also fetch upstream. Resolve the conflicting descriptions so users do not mistake an upstream comparison for a last-fetch-local answer.
here. THE SHAPE PIN is read too (his RULING of the same day, "next layer:
shape-pin drift"): every root and holder carries `contracts/shape-pin.yaml`,

README.md:44

  • This says every root and holder carries a shape pin, but the implementation explicitly treats a root without contracts/shape-pin.yaml as valid and silent (read_shape returns immediately). Please state that the check applies to roots/holders that carry the pin, otherwise the documented estate model contradicts the supported pinless-root behavior.
here. THE SHAPE PIN is read too (his RULING of the same day, "next layer:

status:1319

  • path comes directly from shape-pin.yaml and is concatenated without containment validation, so a ../ entry or a symlink can make status hash files outside the estate. Reject absolute/traversal paths (and ensure the resolved target remains under the root) before testing or hashing the copy; otherwise a malformed or untrusted pin can inspect private files or trigger unexpectedly expensive reads.
        actual="$(file_sha256 "$root/$path")"

status:36

  • The new behavior fetches upstream as well as origin, but the preceding header still says git fetch --prune origin only (and the duplicated comments near the argument parser repeat that wording). This leaves the command's operational documentation contradictory about which remote-tracking refs become current; update all copies to describe both remotes.
# this command ever makes — remote-tracking refs (`refs/remotes/<remote>/*`:
# origin, and upstream where a fork has one),

status:61

  • The command header says every assembly root and family holder carries a shape pin, but read_shape deliberately returns without a finding when the pin is absent. Clarify this as an optional check for roots/holders that have the pin so the header does not contradict the implemented pinless-root behavior.
# holder carries `contracts/shape-pin.yaml`: the openRepoShape commit its
# copied shape files were cut from, and a sha256 per copy. The copies are

status:1162

  • Malformed files: rows are silently discarded by this parser. If the block is empty or all rows have unexpected indentation/order, read_shape reports 0/0 copies match and can otherwise report the root clean, hiding a corrupt pin instead of flagging that its copy list could not be read. Preserve/report malformed rows (and the no-files case) as a finding rather than treating them as an empty valid set.
# `path<TAB>sha256` per row of the pin's `files:` block — the rows
# `update-shape.py` writes as `  - path: <p>` / `    sha256: "<hex>"`, in
# that order; a hand-edited row the other way round is dropped, which is one
# reason the note counts rows. A trailing comment on a path is not part of
# it. A new top-level key ends the block.

status:1269

  • This lookup also lacks a failure cache. When GitHub cannot answer the source repository's default_branch, SHAPE_DEFAULT_SOURCE remains empty, so every later pinned root repeats the identical repository request instead of honoring the documented once-per-source query and the shared failure policy. Record the failed source lookup for the run and reuse that unanswered state.
    if [ "$SHAPE_DEFAULT_SOURCE" = "$source" ] && [ -n "$SHAPE_DEFAULT_BRANCH" ]; then
        default="$SHAPE_DEFAULT_BRANCH"
    else
        gh_api_line "shape check" "repos/$source" '.default_branch // "main"' || return 1
        default="$GH_LINE"
        [ -n "$default" ] || default=main
        SHAPE_DEFAULT_SOURCE="$source"
        SHAPE_DEFAULT_BRANCH="$default"

status:1284

  • When GitHub returns a successful response that does not contain two numeric counts, this branch records that the comparison was not read but returns success. read_shape therefore appends against ... per GitHub, falsely claiming currency was answered; propagate failure here so it emits the existing currency NOT read state instead.
    if ! is_count "$behind" || ! is_count "$ahead"; then
        finding "shape: GitHub's compare of pin $(short "$commit") with $source $default was not two counts; not read"
        return 0

status:1302

  • A pin without source_repository is currently allowed through as a clean result: the output says of an unnamed source, omits currency status, and returns no finding, even though there is no source against which the pin can be checked. Record the missing required source as a finding while retaining the copy and mirror checks; otherwise a malformed pin is reported as in sync.
    commit=""; yaml_scalar "$pin" commit && commit="$YAML_VALUE"
    source=""; yaml_scalar "$pin" source_repository && source="$YAML_VALUE"
  • Files reviewed: 5/5 changed files
  • Comments generated: 3
  • Review effort level: Lite

"""
lines = (REPO / "AGENTS.md").read_text().splitlines()
assert len(lines) <= 122, f"AGENTS.md is {len(lines)} lines; the cap is 122"
assert len(lines) <= 133, f"AGENTS.md is {len(lines)} lines; the cap is 133"
Comment thread status
Comment on lines +1240 to +1243
if ! g "$clone" cat-file -e "$commit^{commit}" 2>/dev/null; then
finding "shape pin $(short "$commit") is not in the clone of $source at $clone, as of its last fetch: fetch it, or the pin is on a commit that was squash-merged away"
return 0
fi
Comment thread status
Comment on lines +1274 to +1279
else
gh_api_line "shape check" "repos/$source/compare/$commit...$default?per_page=1" \
'[(.behind_by|tostring), (.ahead_by|tostring)] | join("\u001f")' || return 1
IFS=$'\037' read -r behind ahead <<<"$GH_LINE"
SHAPE_ASKED="$source $commit"
SHAPE_ASKED_BEHIND="$behind"
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.

2 participants