Files
codebase-memory-mcp/tests
Martin Vogel 3401def5ba fix(deploy): coarse rule for Helm changes not run, BasePath includes, render memory
Review round 3 of #2677. The user decided on a rule sound by construction:
a change of maps the render does not run exactly leaves every later image
of that render UNKNOWN, with no exemption.

Changes of maps (helm_template.c):
- Under UNKNOWN control -- a skipped if / with / range body, the rest of a
  loop an UNKNOWN break / continue may leave, an include or template not
  run, a tpl not run -- any set / unset / merge (the must* forms too), any
  tpl, and any include / template of a name not known, of no define or
  template file of the chart, or of one that may change maps, leaves the
  images after it UNKNOWN.
- An executed set / merge does too unless its target is a known map that
  is poisoned exactly; a merge also for a target already poisoned, the
  .Values root, or a map not known within it. The own provenance and the
  freshness scan are gone.
- .Template.BasePath is modelled as Helm sets it: <chart path>/templates,
  the top chart's name, then /charts/<alias or name> per subchart
  (pass_k8s.c). An include naming one of the chart's template files by it
  (the checksum idiom) is scanned with the same rule; a file reached again
  while scanned, or no such file, may change maps.

Bounds (helm_template.c):
- A capture's keys are a hash set and its mark is built in one pass (one
  sort for the prefix check), its steps charged.
- Each render works in an arena of its own; the caller keeps its results
  only.
- The trip reason is recorded where a budget trips: an output trip is
  logged as output.

Releases (pass_terraform.c, pass_k8s.c):
- Any set_sensitive leaves the release without an image of its own (the
  name-overlap check is gone), and so does a postrender written as a
  dynamic block or an attribute.

Cost on the 20 infra corpora against 5c5964ef: 20 Image edges lost, 0
added, no budget trip. 5 are changes the rule rightly cannot follow (a
second mustMerge into a poisoned values map; a skipped part that may
change maps), 15 come from checksum-included files that hold a tpl. Two
controls of rounds 1-3 now read UNKNOWN; their tests say so.

Tests: one per item, each failing on 5c5964ef by its assertion (the
BasePath ones also on the coarse rule without it); the wrong-image
scenarios of rounds 2 and 3 stay as tests.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-19 01:59:48 +02:00
..
2026-10-11 16:57:48 +02:00