Repository navigation
sync: add the investigation_pack hive - #484
Conversation
--investigation-pack on sync pull/push, included in --all and --all-available, Configs.ALL_HIVES, the YAML 1.2 loader rule, docs, permissions table and changelog. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Self-review (adversarial), head 8c28723. Checked and found no open issue:
|
|
/lc-review |
There was a problem hiding this comment.
AI Code Review Summary
Verdict: APPROVED (0 High, 0 Medium, 1 Low)
I found no High or Medium issues. The new flag, the _HIVE_FLAG_MAP entry, the pull/push signatures, Configs.ALL_HIVES and INVESTIGATION_HIVES all match. The tests call the real _resolve_sync_flags, the Configs.fetch_to_file/push_from_file functions and the CLI through CliRunner. They mock only the HTTP client, so they do not simulate the code under test.
General Feedback
- Low Priority: Two flag lists still leave out
--investigation-pack, and the diff does not touch either line, so I could not comment on them inline:doc/cli/infrastructure.md:51-56: the "Available hive flags" list ends with--investigation-policy,--investigation-plan. Add--investigation-packthere.limacharlie/commands/sync.py:246-273: thesync.pullexplain text ("Hive flags" block) has no--investigation-*flag.--investigation-policyand--investigation-planwere already missing before this PR. Users who readlimacharlie explain sync.pullwill not learn that the new flag exists.
test-time-budget: no check run was found on this commit. Neither branch protection nor rulesets onmasterrequire the check, so it does not block this review.
Blast radius
--alland--all-availableonsync pull/sync pushnow includeinvestigation_pack.- With
--all, a key that lacksinvestigation_plan.getnow fails on the pack hive as well. Before this PR, such a key would already have failed oninvestigation_plan, so no key that passed before fails now. sync push --all --forcenow also removes pack records that are missing from the local file. A config file exported by an older CLI has noinvestigation_packsection. Pushing that file with--all --forcewill delete every pack in the org, and templates that use those packs may then break. The CHANGELOG entry could warn about this, as with any new hive added to--all.limacharlie hive set/hive update(throughload_record_yaml) now readinvestigation_packinput with the YAML 1.2 boolean rule. A pack'sdatais{"yaml": "<string>"}, so the pack source itself does not change.Configs.ALL_HIVESis part of the public SDK, so code that reads it will now see the new hive.
This review was generated automatically by Claude Code.
…nd version rule Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
/lc-review |
There was a problem hiding this comment.
AI Code Review Summary
Verdict: APPROVED (0 High, 0 Medium, 0 Low)
Re-review of 5d50e03 against my earlier review of 8c28723. Since then only CHANGELOG.md, doc/cli/infrastructure.md, doc/sdk/configs.md and limacharlie/commands/sync.py changed. I reviewed those again in full. The other files have not changed since my last review.
Earlier findings
- My earlier Low finding is fixed.
--investigation-packis now in the "Available hive flags" list indoc/cli/infrastructure.md. Thesync.pullexplain text inlimacharlie/commands/sync.pynow lists all three--investigation-*flags.
General Feedback
- The new CHANGELOG and docs text describes two Hive rules for packs: the
allow-api-key-promotiontag and the higherversionneeded when a pack source changes. These rules are enforced by the server, not by this repository, so I could not check them here. test-time-budget: no check run was found on this commit. Neither branch protection nor rulesets onmasterrequire the check, so it does not block this review.
Blast radius
sync pull/sync pushwith--allor--all-availablenow includeinvestigation_pack.sync push --all --forcewith a config file exported by an older CLI (which has noinvestigation_packsection) will remove every pack in the org. Templates that use those packs may then fail.Configs.ALL_HIVESandyaml_input.INVESTIGATION_HIVESare public, so code that reads them will now see the new hive.hive set/hive updatenow readinvestigation_packinput with the YAML 1.2 boolean rule. A pack's source is a string, so it is not affected.
This review was generated automatically by Claude Code.
What
limacharlie sync pull/sync pushsupport theinvestigation_packhive (the packs of shared checks that Investigation Engine templates use), like the other two investigation hives.--investigation-pack;--alland--all-availableinclude it (_HIVE_FLAG_MAP), and so doesConfigs.ALL_HIVES.INVESTIGATION_HIVES(the YAML 1.2 boolean rule for config files) includes it.doc/cli/infrastructure.md: permissions table row and the "Investigation configuration sync" section (apply order: settings record, packs, templates; removals in reverse).investigation_planpermission family, so a key that already syncs templates needs nothing new;sync pull --allfails without the read permission and--all-availableskips the hive.The apply order and compare-and-swap writes happen in the Infrastructure extension's SDK, which is changed in refractionPOINT/go-limacharlie#300.
Tests
Flag selection (alone and with
--all),ALL_HIVES, the YAML rule, CLI pull/push round trip with the pack flag and--all, and a pack record's source carried unchanged through export and push. Fulltests/unit+tests/microbenchmarks: 6652 passed.🤖 Generated with Claude Code