Skip to content

Use agentrc's canonical agentrc_pin.py, pin agentrc e6cd302 - #407

Open
hathach wants to merge 2 commits into
masterfrom
wave6
Open

hathach wants to merge 2 commits into
masterfrom
wave6

Conversation

@hathach

@hathach hathach commented Nov 23, 2026

Copy link
Copy Markdown
Member

Problem

This core carried its own agentrc_pin.py, with the cache namespace, profile API and features hard-coded, so every
agentrc bootstrap change had to be ported here by hand (hathach/agentrc#399, hathach/agentrc#438).

Solution

Full-roster HIL on ci.lan: metro_m4_express passes cdc_arduino, cdc_tinyusb and timing. agentrc_pin.py test passes
all 43 tests.

@hathach hathach self-assigned this Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pin script now reads per-core agentrc settings from test/hil/agentrc.json. It validates the selected source against the configured API and features, freezes its identity, and loads only files bound to that identity.

Changes: Agentrc contract and source loading

Layer / File(s) Summary
Configure and fetch the agentrc pin
.claude/skills/hil-contract/SKILL.md, .claude/skills/hil-contract/scripts/agentrc_pin.py, test/hil/agentrc.json, .claude/test/test_agentrc_pin.py, .claude/test/test_build.py
The configuration adds a cache namespace, profile API, features, and extra engines, and updates the commit. The pin script validates these settings and uses the configured namespace for fetches. Tests check the configuration, build feature usage, and literal lookup.
Freeze and load the selected source
.claude/skills/hil-contract/scripts/agentrc_pin.py, .claude/test/test_agentrc_pin.py
Source selection validates the configured API and features, freezes the selected identity, and restricts file loading and binding checks to that identity. The test command checks bootstrap script bytes before test discovery. Tests cover selected identity and loading from a staged tree.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Refactor

Sequence Diagram(s)

sequenceDiagram
  participant agentrc_pin.py
  participant agentrc_source
  participant hil_load
  participant unittest
  agentrc_pin.py->>agentrc_source: Discover source and freeze identity
  agentrc_pin.py->>hil_load: Load files in the frozen identity
  agentrc_pin.py->>unittest: Run discovery after bootstrap byte check
Loading

Possibly related PRs

Suggested reviewers: greptile-apps

Merge Risk: Minimal · up to 42a95

This change replaces the locally maintained agentrc pin script with the canonical pinned version and moves per-core settings into a JSON file. No merge-blocking risk was found, and the interpreter-version concern was checked and does not apply to the repository's CI setup.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the core now uses agentrc's canonical agentrc_pin.py instead of a local copy, and the agentrc pin moves to e6cd302. The raw summary and objectives both confirm this ch…
Description check Passed The description states the problem (a locally hard-coded agentrc_pin.py), the solution (verbatim canonical copy, per-core values moved to test/hil/agentrc.json, repin to e6cd302), and test results. It…
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 main change: the core now uses agentrc's canonical agentrc_pin.py instead of a local copy, and the agentrc pin moves to e6cd302. The raw summary and objectives both confirm this change.

Full details: Description check

Explanation

The description states the problem (a locally hard-coded agentrc_pin.py), the solution (verbatim canonical copy, per-core values moved to test/hil/agentrc.json, repin to e6cd302), and test results. It matches the changeset.

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f17d5a9 and 42a95a3.

Files selected for processing: 5

  • .claude/skills/hil-contract/SKILL.md
  • .claude/skills/hil-contract/scripts/agentrc_pin.py
  • .claude/test/test_agentrc_pin.py
  • .claude/test/test_build.py
  • test/hil/agentrc.json

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

Replaces the core-specific bootstrap with agentrc’s canonical agentrc_pin.py and pins agentrc to e6cd302c7e5f310d0fb3d302b5dfedc1022a6dff.

  • Build and HIL contracts use agentrc’s canonical bootstrap.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Config["Read core configuration"] --> Select{"Select agentrc"}
  Select -->|"Staged tree"| Staged["Staged copy"]
  Select -->|"Otherwise, CI"| Pin["Pinned checkout"]
  Select -->|"Otherwise"| Installed["Installed checkout"]
  Staged --> Identity["Freeze source identity"]
  Pin --> Identity
  Installed --> Identity
  Identity --> Features["Check profile version and features"]
  Features --> Load["Check files and load shared scripts"]
Loading

Reviews (2) · Last reviewed commit: "Test the staged rig tree from its own bo..." · Reviewed by Greptile

@hathach

hathach commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

@greptileai

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