feat(projection): add ExecsByPath composite-key surface to ProjectedContainerProfile#812
feat(projection): add ExecsByPath composite-key surface to ProjectedContainerProfile#812entlein wants to merge 1 commit into
Conversation
…ontainerProfile Signed-off-by: entlein <einentlein@gmail.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review Collective re-review request after applying your atomic-split advisory + rabbit-feedback fixes across the full SBOB upstream PR set. Each PR is now scoped to a single tier per your dependency map: Tier 0 (opens):
Tier 2 (execs):
Tier 3 (network):
Tier 4 (tamper/sign):
Umbrellas:
Please confirm atomicity per your earlier advisory and flag any remaining cross-PR coupling we missed. |
🧩 Analysis chain🏁 Script executed: Length of output: 9271
|
| PR | Verdict | Notes |
|---|---|---|
#812 (this) |
✅ atomic | Purely additive; no new imports; no changes to existing behaviour |
#807 → #812 |
✅ clean dep | #807 needs ExecsByPath present; #812 is the sole provider |
#808 → #812 |
#808 must drop its own ExecsByPath addition to avoid a merge conflict after #812 lands; confirm #808's PR description calls this out |
|
#812 → storage |
✅ no coupling | No new storage symbols imported; compiles against storage main today |
No other cross-PR coupling found in the files touched by #812.
✅ Actions performed
Review triggered.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
Tier 2 in the atomic-split decomposition CodeRabbit advised on storage#323 ("Dependency map across all 8 PRs"). This PR carries ONLY the minimal projection surface needed to unblock node-agent#807 (R0040 args consumer), so #807 doesn't have to wait for the much larger node-agent#808 to land.
What's in this PR
Two surgical additions and one set of unit tests:
pkg/objectcache/projection_types.go— addsExecsByPath map[string][]stringtoProjectedContainerProfile. Keyed byExec.Path(same key used inExecs.Values/Execs.Patterns). Carries the per-Path Args slice fromcp.Spec.Execsso downstream consumers can run argv-aware matching against the projected profile.pkg/objectcache/containerprofilecache/projection_apply.go— populates the new field insideApplyand adds theextractExecsByPathhelper. The helper clones each Args slice (Apply is contract-bound to be a pure transform — aliasing would let a consumer mutate the source profile by editing the projected map). Nil-Args entries are stored as empty (non-nil) slices; downstream matchers distinguish "path absent" (key missing) from "path present, ran with no args" (key present, value[]string{}).pkg/objectcache/containerprofilecache/projection_apply_test.go— two new tests pin the contract:TestApply_ExecsByPath_PopulatesFromSpeccovers last-write-wins on duplicate Paths, nil→empty-slice projection, and the cloned-slice invariant (mutating the projection MUST NOT propagate to the source).TestApply_ExecsByPath_NilWhenSpecEmptypins the nil-for-empty convention.Why split it out
Node-agent#808 currently bundles four independent concerns: ExecsByPath field, tamper detection (R1016), non-blocking notification fan-out, and NetworkNeighborhood resource support. The ExecsByPath piece is ~7 lines of struct field + the helper + tests — it's the SINGLE BLOCKER for node-agent#807 to compile. Extracting it as this micro-PR cuts #807's blast radius from "wait on a 1300-line PR" to "wait on this micro-PR".
After this lands, node-agent#808 narrows to (R1016 + fanout + NN resource), which are all independent of #807 and can each land in their own time.
Dependencies
Cross-references