Skip to content

hil-contract: refuse a blank agentrc pin url - #198

Merged
hathach merged 1 commit into
masterfrom
pin-blank-url
Nov 4, 2026
Merged

hathach merged 1 commit into
masterfrom
pin-blank-url

Conversation

@hathach

@hathach hathach commented Nov 4, 2026

Copy link
Copy Markdown
Member

pin() refuses a whitespace-only url in test/hil/agentrc.json. This ports adafruit/Adafruit_TinyUSB_Arduino#602's 9a7619c, so the two libraries' agentrc_pin.py and its test are identical again, apart from the cache namespace.

Tests: CI=true python3 .claude/skills/hil-contract/scripts/agentrc_pin.py test passes all 71. The new case fails against the old pin().

Known gap, left as is in both libraries: a url with spaces around it still passes pin() and fails later at git fetch.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

pin() now rejects URLs that contain only whitespace. The malformed-pin tests include a whitespace-only URL.

Changes: Pin validation

Layer / File(s) Summary
Reject whitespace-only URLs
.claude/skills/hil-contract/scripts/agentrc_pin.py, .claude/test/test_agentrc_pin.py
pin() treats a whitespace-only URL as invalid. The malformed-pin test cases include this input.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: greptile-apps

Merge Risk: Minimal · up to cd9da

This focused validation change is covered by a regression test and introduces no actionable merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the main change: pin() now refuses a blank (whitespace-only) agentrc pin URL in the hil-contract script. The raw summary confirms pin() rejects whitespace-only URLs and the test file a…
Description check Passed The description is related to the changeset. It says pin() refuses a whitespace-only URL in test/hil/agentrc.json, names the ported upstream commit, gives the test command and result, and notes a know…
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: pin() now refuses a blank (whitespace-only) agentrc pin URL in the hil-contract script. The raw summary confirms pin() rejects whitespace-only URLs and the test file adds a matching malformed-pin case. The title is specific and matches the changeset.

Full details: Description check

Explanation

The description is related to the changeset. It says pin() refuses a whitespace-only URL in test/hil/agentrc.json, names the ported upstream commit, gives the test command and result, and notes a known gap with URLs that have surrounding spaces. The summary and objectives match these statements.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
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 edcd78f and cd9da61.

Files selected for processing: 2
  • .claude/skills/hil-contract/scripts/agentrc_pin.py
  • .claude/test/test_agentrc_pin.py

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 4, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Low impact] This PR appears safe to merge.

Summary

pin() now rejects whitespace-only URLs before trying to use the pinned checkout.

  • The HIL contract helper rejects agentrc URLs that contain only whitespace.

Reviews (1) · Last reviewed commit: "hil-contract: refuse a blank agentrc pin..." · Reviewed by Greptile

@hathach
hathach merged commit 78885a2 into master Nov 4, 2026
36 of 38 checks passed
@hathach
hathach deleted the pin-blank-url branch November 4, 2026 16:38
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