Skip to content

feat: snapshots skill#1659

Open
enoodle wants to merge 3 commits into
kai-scheduler:mainfrom
enoodle:skill/kai-scheduler-snapshots
Open

feat: snapshots skill#1659
enoodle wants to merge 3 commits into
kai-scheduler:mainfrom
enoodle:skill/kai-scheduler-snapshots

Conversation

@enoodle
Copy link
Copy Markdown
Collaborator

@enoodle enoodle commented Jun 2, 2026

Description

Adding skills for agents to take snapshots and run on on KAI

Related Issues

Closes #1517

Checklist

  • Self-reviewed
  • Added/updated tests (if needed)
  • Updated documentation (if needed)

Breaking Changes

Additional Notes

enoodle added 2 commits June 2, 2026 14:15
Signed-off-by: Erez Freiberger <enoodle@gmail.com>
Signed-off-by: Erez Freiberger <enoodle@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 2, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9b7b5789-66d1-4cba-b94c-c438efd218d4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Signed-off-by: Erez Freiberger <enoodle@gmail.com>
Comment thread .agents/README.md

### Codex

Codex can consume skills from `.agents/skills/` when working inside this repository.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

And how will Codex know where to look for this skill? You do have an ln command for claude

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It knows to look at .agents (https://developers.openai.com/codex/skills#where-to-save-skills) it is a common location to set such skills (see NemoClaw for example)

cleanup() {
if [[ -n "$port_forward_pid" ]] && kill -0 "$port_forward_pid" >/dev/null 2>&1; then
kill "$port_forward_pid" >/dev/null 2>&1 || true
wait "$port_forward_pid" >/dev/null 2>&1 || true
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

wait with some timeout?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

because of how we setup the port-forward it is not expected to resist the kill command. I can add a timeout anyway


- `inspect-snapshot.sh`: validate that the archive contains `snapshot.json` and print top-level structure. Run this before replaying user-provided artifacts.
- `run-snapshot.sh`: build `snapshot-tool` with `make build-go SERVICE_NAME=snapshot-tool` and replay on the current checkout, or use `--ref` to switch to one Git ref, replay, and restore the original branch or commit. For large snapshots, start with `--verbosity 2`. For reruns, prefer `--no-build --tool bin/snapshot-tool-amd64`. If a ref-based run is interrupted hard enough that the shell trap does not execute, the repo can stay detached; check with `git status --short --branch` and restore with `git switch <branch>`.
- `compare-snapshot-refs.sh`: run the same snapshot against several refs and save one log per ref plus `summary.tsv`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please explain the script in more details - why do we need it? compares the snapshot against what?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I will add the word "git" to make it more clear, I don't want to add too many extra words in the skill. It is used to run the same snapshot against different git references to find regressions or compare results. Also usually people will install a tagged version but a developer might have the main checked out or a specific branch - so the developer / agent might want to run the snapshot against a different version than the current local one.

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.

Skill to take snapshots and run them in the snapshot tool to investigate issues

2 participants