trace-pulumi-diff
marin-community/marin/.agents/skills/trace-pulumi-diff/SKILL.md
Run a read-only preview for a specified Marin infra/pulumi stack and trace each pending resource change to merged pull requests since its latest successful update when that update records a clean Git checkout. Use when a stack has unapplied changes or drift and someone needs to know which PRs explain the preview.
Skill3.9k starsChanged 25 days ago
What's in it
- Trace a Pulumi diff
- Preview current main
- Find the deployed commit
- Attribute the preview
--- name: trace-pulumi-diff description: Run a read-only preview for a specified Marin infra/pulumi stack and trace each pending resource change to merged pull requests since its latest successful update when that update records a clean Git checkout. Use when a stack has unapplied changes or drift and someone needs to know which PRs explain the preview. --- # Trace a Pulumi diff Work only with the `marin-iac` project in `infra/pulumi`. Require an explicit stack name. ## Preview current main Read `infra/pulumi/README.md` and satisfy its credentials and stack-specific prerequisites. Fetch `origin/main` and run from a clean checkout at that commit. Preserve existing work; use another worktree when necessary. Prepare the environment from the repository root: ```bash uv sync --package marin-iac --extra deploy --frozen export PULUMI_PYTHON_CMD="$PWD/.venv/bin/python" ``` Run the preview without changing the selected stack: ```bash pulumi -C infra/pulumi preview --stack <stack> --diff --color never ``` Keep the raw preview local. It may contain decrypted identifiers. If the preview is empty, report that the stack has no pending diff and stop. ## Find the deployed commit Read recent history without secrets: ```bash pulumi -C infra/pulumi stack history \ --stack <stack> --json --page-size 100 > /tmp/marin-pulumi-history-<stack>.json jq -r ' map(select(.kind == "update" and .result == "succeeded")) | first | [.startTime, .environment["git.head"], .environment["git.dirty"]] | @tsv ' /tmp/marin-pulumi-history-<stack>.json ``` Use `git.head` only when it is a commit on `origin/main` and `git.dirty` is `false`. If either condition fails, report that an exact Git baseline is unavailable and stop attribution. ## Attribute the preview List merged commits after the deployed commit: ```bash git log --first-parent --format='%H%x09%s' <deployed-sha>..origin/main ``` Inspect each candidate with `git show`. Match concrete preview resource names and changed properties to the code or configuration diff. Do not attribute a change merely because its commit is in the range. Map a matching commit to its pull request: ```bash gh api repos/marin-community/marin/commits/<commit>/pulls \ --jq '.[] | [.number, .title, .html_url] | @tsv' ``` Report each preview change with its matching PR and the file or hunk that explains it. Report changes with no matching commit as live drift or unresolved attribution. A preview can contain changes from multiple PRs. Never run `pulumi up`, `pulumi refresh`, `pulumi destroy`, an import, or a state mutation. Call out any NodePool replacement or deletion from the preview.
More agent context in marin-community/marin
43 other files this repository gives its agents.
AGENTS.md
CLAUDE.md
Skill
- ab-test-zephyr.agents/skills/ab-test-zephyr/SKILL.md
- add-dataset.agents/skills/add-dataset/SKILL.md
- add-grant.agents/skills/add-grant/SKILL.md
- add-pallas-kernel.agents/skills/add-pallas-kernel/SKILL.md
- archive-experiments.agents/skills/archive-experiments/SKILL.md
- babysit-zephyr.agents/skills/babysit-zephyr/SKILL.md
- change-grug.agents/skills/change-grug/SKILL.md
- commit.agents/skills/commit/SKILL.md
- consult-echo.agents/skills/consult-echo/SKILL.md
- debug.agents/skills/debug/SKILL.md
- deploy-hero-change.agents/skills/deploy-hero-change/SKILL.md
- file-issue.agents/skills/file-issue/SKILL.md
- fix-issue.agents/skills/fix-issue/SKILL.md
- launch-rl.agents/skills/launch-rl/SKILL.md
- lint-review.agents/skills/lint-review/SKILL.md
- manage-hero-run.agents/skills/manage-hero-run/SKILL.md
- marina-applet.agents/skills/marina-applet/SKILL.md
- noslop.agents/skills/noslop/SKILL.md
- onboard-marin.agents/skills/onboard-marin/SKILL.md
- organize-experiments.agents/skills/organize-experiments/SKILL.md
- profile-training.agents/skills/profile-training/SKILL.md
- query-finelog.agents/skills/query-finelog/SKILL.md
- refresh-fork.agents/skills/refresh-fork/SKILL.md
- research.agents/skills/research/SKILL.md
- review-grant.agents/skills/review-grant/SKILL.md
- review-pr.agents/skills/review-pr/SKILL.md
- run-ferries.agents/skills/run-ferries/SKILL.md
- scan-logs.agents/skills/scan-logs/SKILL.md
- scrub-docs-code-parity.agents/skills/scrub-docs-code-parity/SKILL.md
- scrub-experiment-issue-tldrs.agents/skills/scrub-experiment-issue-tldrs/SKILL.md
- scrub-reflection-self-improvement.agents/skills/scrub-reflection-self-improvement/SKILL.md
- triage-canary.agents/skills/triage-canary/SKILL.md
- update-docs.agents/skills/update-docs/SKILL.md
- upload-hf-model.agents/skills/upload-hf-model/SKILL.md
- use-fsutil.agents/skills/use-fsutil/SKILL.md
- use-iris.agents/skills/use-iris/SKILL.md
- write-ops-log.agents/skills/write-ops-log/SKILL.md
- write-pipeline.agents/skills/write-pipeline/SKILL.md
- write-tests.agents/skills/write-tests/SKILL.md
- writing-style.agents/skills/writing-style/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
Reports can't be read right now.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

