Files
codebase-memory-mcp/tests
Martin Vogel b8a5050813 feat(shell,ci): scripts and CI jobs SPAWNS the scripts they run
"Which CI jobs run hack/ci/run-e2e-tests.sh, and what does that script
start?" had no answer: a command running a script of the repository drew
no edge (SPAWNS reached Process nodes only, and repository scripts were
left out), and CI configurations were not read at all.

- A shell script, Make recipe or CI command that runs a script of the
  repository -- by its path (./hack/x.sh, "$ROOT/hack/x.sh") or through a
  shell (bash -e hack/x.sh) -- SPAWNS that script: its Module (the source
  of the script's own edges, so CI -> script -> deploy chains connect),
  else its File. The path must resolve to exactly one file; a program that
  is no repository file keeps its Process edge.
- A new pass_ci.c reads GitHub Actions workflows and composite actions
  (run: steps with their working directory, shell, env literals,
  ${{ github.workspace }} and ${{ github.action_path }}; no pwsh step, no
  step of a Windows job) and Prow job configs (container command + args,
  exec'd; bash -c TEXT as shell; a decorated job starts in the checkout).
  The shell layer evaluates them like a script; their DEPLOYS and SPAWNS
  edges come from the workflow / job file and carry "ci" and "job".
- env A="$X/y" PROGRAM: an assignment with an unknown value is no longer
  taken for the program (it made a Process named after the value's last
  segment and hid the program).

Measured on 17 repositories against an independent reading (libyaml for
the CI files, a separate shell reader for the commands): 292 of 292
script runs linked, 292 of 292 correct -- from Prow jobs (115 containers),
GitHub Actions steps, shell scripts and Make recipes, across 10
repositories (kubermatic, gardener, kube-hetzner, cluster-api, deckhouse,
k8s.io, ...); CI Process and deploy edges 4 of 4. Only SPAWNS (+295),
DEPLOYS (+1), Process (+3) and Chart (+1) changed; three runs build
identical graphs; index time unchanged (kubermatic 2.95 -> 2.93 s,
gardener 5.25 -> 5.25 s, kube-hetzner 1.13 -> 1.14 s, medians); editing or deleting scripts, workflows,
Prow jobs and Makefiles leaves the graph a fresh index builds (two
scenarios differ in SEMANTICALLY_RELATED edges and Make pattern-rule
nodes exactly as the previous build does).

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-10-11 06:37:17 +02:00
..