Skip to content

[specimen, not for merge] Garnet nested git prepare skipped-build replay - #81

Closed
jadoonf wants to merge 1 commit into
mainfrom
cursor/garnet-git-prepare-skip-b574
Closed

jadoonf wants to merge 1 commit into
mainfrom
cursor/garnet-git-prepare-skip-b574

Conversation

@jadoonf

@jadoonf jadoonf commented Sep 26, 2026 •

Copy link
Copy Markdown

Summary

Fork-only diagnostic specimen, not for merge.

Adds a two-cell Garnet replay for a nested git/prepare install. A local git fixture has one unapproved transitive lifecycle build, while the outer project allowlists only the git root package. The strict cell makes ignored builds fatal; the nonfatal cell skips the same build and lets the install complete.

The step summary records both exit codes, the ignored-build diagnostic, whether the git root prepare ran, whether the transitive install ran, and the temporary prepare checkout path. Both cells use pnpm 12.3.4. The only A/B variable is pnpm_config_strict_dep_builds, inherited by the nested install.

Squash Commit Body

Add a fork-only runtime specimen for nested git dependency preparation.

Record the child install under strict and nonfatal ignored-build policy, with lifecycle markers and a native step-summary oracle.

Checklist

  • Added a local fixture and native A/B oracle.
  • No published package changes or changeset.
  • No product or documentation changes.

Written by an agent (Cursor, GPT-5.6 Sol).

Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Runtime evidence (Garnet)

Kernel-recorded execution record for head 68235e6eab82183538488104fdad31d51e2687bf, mirrored verbatim from
the sticky Garnet Runtime Review comment on this PR so reviewers that read only
the description ground in the same bytes. Facts only. Judgment stays with the
reviewer. Cite grounded findings as:

Runtime evidence (Garnet, head 68235e6): <execution chain> → <destination> (<workflow>/<job>) —

Execution record (verbatim mirror)

Execution Profiles recorded for 1 job, triggered by 68235e6

4 destinations
recorded at the kernel by Garnet · 2026-09-26 06:12 UTC

Garnet git prepare skipped-builds replay / replay ↗ · 4 destinations
Runner.Worker
├─ bash
│  └─ pnpm (step: "<unknown>")
│     └─ ○ registry.npmjs[.]org
└─ ○ localhost (dns resolver)

systemd
├─ hosted-compute-agent
│  └─ sudo
│     └─ provjobd (ran from /tmp/…)
│        └─ ○ 140.82.112.23
└─ python3.12
   └─ python3.12
      └─ ○ 168.63.129.16

View this job's Execution Profile in Garnet →


💡 How to read this
Runner.Worker          ← process on a path
└─ npm
   └─ node             ← process that acted
      └─ ○ npmjs[.]org ← observed action

follow a path downward to see what ran and what it did — each path to an observed action is an execution chain

names on the path = processes · ○ = observed action · (…) = context

Workload behaviour (Garnet)

Garnet git prepare skipped-builds replay / replay · head 4accd5e · 7 workload chains · 4 runner-platform chains

Workload behaviour vs ba67148: +0 −8 destinations
− github[.]com
− codeload.github[.]com
− nodejs[.]org
− node-registry.bit[.]cloud
− pnpm[.]io
− release-assets.githubusercontent[.]com
− unofficial-builds.nodejs[.]org
− npm.jsr[.]io
runner platform: +2 −20 destinations · not workload behaviour

7 workload chains · 2 destinations at head, 8 gone
destination chains Δ vs base reached by
registry.npmjs[.]org 5 72 → 5 pnpm
localhost 2 19 → 2 pnpm
codeload.github[.]com 0 gone node
github[.]com 0 gone git-remote-http, node
node-registry.bit[.]cloud 0 gone node
nodejs[.]org 0 gone node
npm.jsr[.]io 0 gone node
pnpm[.]io 0 gone node
release-assets.githubusercontent[.]com 0 gone node
unofficial-builds.nodejs[.]org 0 gone node
runner platform · 4 chains · 3 destinations at head, 20 gone · no recorded workflow step
destination chains Δ vs base reached by
168.63.129.16 2 new python3.12, systemd-resolved
140.82.112.23 1 new provjobd811922291
localhost 1 7 → 1 Runner.Worker
140.82.112.22 0 gone nginx
140.82.113.21 0 gone nginx
140.82.114.21 0 gone nginx
169.254.169.123 0 gone chronyd
185.125.190.56 0 gone chronyd
185.125.190.57 0 gone chronyd
185.125.190.58 0 gone chronyd
192.168.127.1 0 gone blacksmithd, sudo
198.137.202.56 0 gone chronyd
23.143.196.204 0 gone chronyd
23.186.168.128 0 gone chronyd
5.161.94.12 0 gone chronyd
8.8.8.8 0 gone nginx, systemd-resolve
91.189.91.157 0 gone chronyd
api.snapcraft[.]io 0 gone snapd
cloudfront.cdn.snapcraftcontent[.]com 0 gone snapd
nodejs[.]org 0 gone pnpm
productionresultssa15.blob.core[.]windows 0 gone node
registry.npmjs[.]org 0 gone pnpm
unofficial-builds.nodejs[.]org 0 gone pnpm

recorded at the kernel by Garnet · profile view →

@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@garnet-runtime-review

garnet-runtime-review Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Execution Profiles recorded for 1 job, triggered by 68235e6

4 destinations
recorded at the kernel by Garnet · 2026-09-26 06:12 UTC

Garnet git prepare skipped-builds replay / replay ↗ · 4 destinations
Runner.Worker
├─ bash
│  └─ pnpm (step: "<unknown>")
│     └─ ○ registry.npmjs[.]org
└─ ○ localhost (dns resolver)

systemd
├─ hosted-compute-agent
│  └─ sudo
│     └─ provjobd (ran from /tmp/…)
│        └─ ○ 140.82.112.23
└─ python3.12
   └─ python3.12
      └─ ○ 168.63.129.16

View this job's Execution Profile in Garnet →


💡 How to read this
Runner.Worker          ← process on a path
└─ npm
   └─ node             ← process that acted
      └─ ○ npmjs[.]org ← observed action

follow a path downward to see what ran and what it did — each path to an observed action is an execution chain

names on the path = processes · ○ = observed action · (…) = context


- name: Install pinned pnpm
shell: bash
run: npm install --global "pnpm@$PNPM_VERSION"
@github-actions

Copy link
Copy Markdown

/agentic_review

@github-actions

Copy link
Copy Markdown

@coderabbitai review

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📜 Skill insights (0)

Grey Divider


Action required

1. PR scripts mint job identity 🐞 Bug ⛨ Security
Description
Static inference: the workflow grants id-token: write to the same job that checks out and executes
PR-controlled lifecycle scripts. A same-repository PR can replace either fixture script, request the
job's OIDC token, and authenticate to any external service whose trust policy accepts this workflow
identity.
Code

.github/workflows/garnet-git-prepare-skip-builds-replay.yml[12]

+  id-token: write
Relevance

●●● Strong

Recent security precedent accepted restricting credentials exposed to untrusted workflow execution.

PR-#43

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The workflow checks out the pull-request head and runs pnpm install, which invokes the fixture's
repository-controlled prepare script. GitHub documents that id-token: write exposes the request
URL and bearer token needed by a step to mint an OIDC token, so replacement lifecycle code can use
this permission directly.

.github/workflows/garnet-git-prepare-skip-builds-replay.yml[35-44]
.github/workflows/garnet-git-prepare-skip-builds-replay.yml[109-121]
fixtures/garnet-git-prepare-skip/git-dependency/package.json[10-14]
🌐 GitHub states that id-token: write allows a job to request an OIDC token through runner-provided request URL and bearer-token environment variables.

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The pull-request workload executes repository-controlled lifecycle scripts in a job that can request an OIDC identity token.

## Fix Focus Areas
- .github/workflows/garnet-git-prepare-skip-builds-replay.yml[10-12]
- .github/workflows/garnet-git-prepare-skip-builds-replay.yml[109-118]

## Recommended Fix
Remove `id-token: write` from this job because the Garnet action already receives its API token explicitly. If OIDC is mandatory, execute the PR-controlled install in an isolated environment that does not receive the runner's OIDC request URL or bearer token.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Broken replay cells still pass 📘 Rule violation ▣ Testability
Description
Record native oracle computes expected_observation=no when an install has the wrong exit code,
diagnostic, or lifecycle markers, but only writes the result to $GITHUB_STEP_SUMMARY without
asserting it. Because the install step has continue-on-error: true, either matrix cell can violate
its expectations and still proceed through the always-run settling step while both jobs report
success.
Code

.github/workflows/garnet-git-prepare-skip-builds-replay.yml[178]

+            echo "| expected observation | \`$expected_observation\` |"
Relevance

●●● Strong

Recent accepted precedent requires failed or unavailable workload evidence to prevent an overall
PASS.

PR-#43

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The install failure is explicitly tolerated, and the oracle initializes expected_observation to
no, changing it only when every expected condition matches. Its final block merely appends the
value to $GITHUB_STEP_SUMMARY without an assertion or failing exit, while the following always-run
sleep also does not enforce the result, so unexpected behavior cannot fail the new workflow as
required by compliance rule 2757148.

Rule 2757148: Do not skip or disable failing tests introduced or touched by the change
.github/workflows/garnet-git-prepare-skip-builds-replay.yml[109-121]
.github/workflows/garnet-git-prepare-skip-builds-replay.yml[152-182]
.github/workflows/garnet-git-prepare-skip-builds-replay.yml[152-165]
.github/workflows/garnet-git-prepare-skip-builds-replay.yml[167-186]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new replay records whether each matrix cell matched its expected behavior but does not fail when that check returns `no`, allowing regressions to pass CI.

## Fix Focus Areas
- .github/workflows/garnet-git-prepare-skip-builds-replay.yml[152-182]

## Recommended Fix
After writing the complete step summary, check whether `expected_observation` equals `yes` and exit nonzero otherwise. Keep `continue-on-error` on the install step so the strict-failure cell can reach the oracle, and retain the final `if: always()` settling step.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 36 rules
✅ Web pages:
  +2 more
✅ REVIEW.md
Review mode: ⚖️ Balanced: This adds a new CI workflow with install/build lifecycle execution, elevated id-token permissions, external actions, and security-sensitive runtime evidence handling, warranting a complete review.
ⓘ  1 issues published inline · 2 in summary

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo


permissions:
contents: read
id-token: write

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Pr scripts mint job identity 🐞 Bug ⛨ Security

Static inference: the workflow grants id-token: write to the same job that checks out and executes
PR-controlled lifecycle scripts. A same-repository PR can replace either fixture script, request the
job's OIDC token, and authenticate to any external service whose trust policy accepts this workflow
identity.
Agent Prompt
## Issue description
The pull-request workload executes repository-controlled lifecycle scripts in a job that can request an OIDC identity token.

## Fix Focus Areas
- .github/workflows/garnet-git-prepare-skip-builds-replay.yml[10-12]
- .github/workflows/garnet-git-prepare-skip-builds-replay.yml[109-118]

## Recommended Fix
Remove `id-token: write` from this job because the Garnet action already receives its API token explicitly. If OIDC is mandatory, execute the PR-controlled install in an isolated environment that does not receive the runner's OIDC request URL or bearer token.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants