Repository navigation
sync pull: note hives the org's region does not have instead of failing - #481
Conversation
|
/lc-review |
There was a problem hiding this comment.
AI Code Review Summary
Verdict: APPROVED (0 High, 0 Medium, 0 Low)
No issues found. I read all five changed files. In sync pull, entries with reason == "unknown_hive" now print a Note: on stderr instead of a Warning:. Entries with reason: "unauthorized" or with no reason still follow the old permission/error path. fetch_with_report already returned every dict entry from skipped_hives, whatever skip_unauthorized_hives was set to, so the docstring fix matches the code. The new tests go through the CLI and mock only the transport. They cover --all, --all-available, --hive-fp, --quiet, mixed reasons and the no-reason fallback, and they check the stderr text, the exit code and the written file. I found no flaky patterns: no sleeps, no shared paths outside tmp_path, no network.
General Feedback
test-time-budget: no check run was found for this commit, andmasterdoes not require the check (branch protection and rulesets list no required checks).
Blast Radius
limacharlie sync pullstderr output changes. Scripts that grep stderr forWarning: skipped hivewill no longer match unknown-region hives, because those lines now start withNote:. The exit code and stdout do not change.- SDK:
Configs.fetch_with_report/fetch_to_filechange only in their docstrings. Callers may now see areasonkey inskipped_hivesentries when a newer Infrastructure extension returns one. Older backends see no change.
This review was generated automatically by Claude Code.
|
Self-review (adversarial), head 53330bb: read the full diff. Checked that |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
53330bb to
f1568fd
Compare
|
/lc-review |
There was a problem hiding this comment.
AI Code Review Summary
Verdict: APPROVED (0 High, 0 Medium, 0 Low)
This is a re-review. The branch diverged from the last reviewed commit (53330bb), so I reviewed all five files again as a first round. The PR diff is the same as before and I found no issues.
sync pull: entries withreason == "unknown_hive"print theNote:line on stderr and skip the permission/error text. Entries withreason: "unauthorized"or no reason still print the oldWarning:text. The loop runs for every pull, not only--all-available, and its output is not gated on--quiet.Configs.fetch_with_reportreturns every dict entry ofskipped_hives, whateverskip_unauthorized_hivesis set to.fetch_to_fileextends the caller's list with those entries, so the updated docstrings match the code.- The tests go through the CLI and mock only the transport. They check the stderr text, the exit code and the written file under
tmp_path. They use no sleeps, no shared paths and no network.
General Feedback
test-time-budget: no check run was found for this commit.masterdoes not require the check: branch protection and rulesets list no required checks.
Blast Radius
limacharlie sync pullstderr: lines for unknown-region hives now start withNote: skipped hiveinstead ofWarning: skipped hive. Scripts that grep stderr for the warning will not match them. Exit codes and stdout do not change.- SDK:
Configs.fetch_with_reportandfetch_to_filechange only in their docstrings. When a newer Infrastructure extension is used, callers may see areasonkey inskipped_hivesentries, and may see unknown-hive entries even whenskip_unauthorized_hives=False.
This review was generated automatically by Claude Code.
What
sync pullnow readsskipped_hives[].reasonfrom the Infrastructure extension'sfetchresponse.reason: "unknown_hive"(the API does not know the hive in this org's region) printsNote: skipped hive <hive>: it is not available for this organization, so there is nothing to back up.on stderr (also with--quiet) and exits 0. Entries withreason: "unauthorized", or with no reason (older backend), keep today's warning text.Configs.fetch_with_report/fetch_to_filealready passskipped_hivesthrough regardless of--all-available; only the docstring said otherwise, so that is fixed. The CLI prints them for every pull (strict--alland explicit hive flags included).investigation_policy/investigation_planstay in--all.Needs an Infrastructure extension that returns
reasonand skips unknown hives; against an older one nothing changes.Tests
New unit tests at the request boundary: unknown_hive with
--all,--all-available,--hive-fpand--quiet(note printed, exit 0, file written); mixed reasons; no-reason entry keeps the old text.pytest tests/unit/ tests/microbenchmarks/: 6544 passed.Docs:
doc/cli/infrastructure.md, thepullexplain text, CHANGELOG "Unreleased".🤖 Generated with Claude Code