Skip to content

feat(demo-sparkles): add hackathon demo scripts for SliceCheck scenarios - #131

Open
neomatrix369 wants to merge 5 commits into
mainfrom
ai-tinkerers-sparkles-hackathon
Open

feat(demo-sparkles): add hackathon demo scripts for SliceCheck scenarios#131
neomatrix369 wants to merge 5 commits into
mainfrom
ai-tinkerers-sparkles-hackathon

Conversation

@neomatrix369

Copy link
Copy Markdown
Owner

Summary

  • chore(demo-sparkles): add teardown script for Worker secrets
  • chore(demo): remove duplicate demo/preflight.sh
  • style: add trailing newlines so pre-push end-of-file-fixer can pass
  • Adding the demo folder with updated shell scripts
  • feat(demo-sparkles): add hackathon demo scripts for SliceCheck scenarios

Adds SliceCheck hackathon demo scripts under demo-sparkles/ (preflight, scenarios, setup/teardown secrets) so the Sparkles demo can configure Cloudflare Worker secrets and walk the audit/PR flows.

Test Results

Python (pytest — sandbox/tests, guard/tests)

  • Pass: 439 | Fail: 0 | Skip: 0
  • Coverage: 95.64% (gate ≥95.0%)

CLI (npm --prefix cli run test:coverage)

  • Pass: 138 | Fail: 0
  • Coverage: Statements 98.24% · Branches 86.3% · Functions 95.83% · Lines 98.24%

Quality Gates

  • ruff (sandbox, guard): pass
  • gitleaks (demo-sparkles): no leaks found
  • Complexity: xenon unavailable in this environment; skipped

Checklist

  • ./scripts/quality-gates.sh passes locally
  • New tests added or updated (or change is docs-only)
  • Docs updated where applicable
  • No secrets or credentials committed

Test plan

  • Run bash demo-sparkles/setup-secrets.sh against Worker slicecheck (wrangler already logged in)
  • Confirm secrets present via Worker health/audit path
  • Run YES=1 bash demo-sparkles/teardown-secrets.sh and confirm secrets removed + local secrets/slicecheck-webhook-secret cleared
  • Smoke bash demo-sparkles/preflight.sh with GITHUB_TOKEN set

Made with Cursor

Three runnable scenarios covering fail→fix (scenario 1), open PR audit
(scenario 2), and retrospective closed-PR audit (scenario 3), plus a
preflight checker to validate all dependencies before the live demo.
Adds the SliceCheck health endpoint slice spec to PROGRESS.md.

Claude-Session: https://claude.ai/code/session_01WUgA32wA2VYbLkioRkSh7w
HEAD lacked a final newline in .gitignore and demo/preflight.sh. The hook
auto-fixed them, then conflicted with the same unstaged working-tree
change and rolled back, blocking the push.
SliceCheck preflight lives in demo-sparkles/; the extra demo/ copy was
unused and kept colliding with hook auto-fixes.
Undo setup-secrets.sh by deleting Cloudflare Worker secrets and clearing the local webhook-secret cache.
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

code-review-graph review

Overall risk: 0.85 (CRITICAL) — 10 changed function(s)/class(es), 2 affected flow(s), 10 test gap(s)

Risk-scored changes

Risk Level Symbol Location Tested
0.85 critical demo-sparkles/setup-secrets.sh::redact demo-sparkles/setup-secrets.sh:23 no
0.85 critical demo-sparkles/setup-secrets.sh::need_cmd demo-sparkles/setup-secrets.sh:33 no
0.85 critical demo-sparkles/setup-secrets.sh::wrangler_cmd demo-sparkles/setup-secrets.sh:40 no
0.85 critical demo-sparkles/setup-secrets.sh::put_secret demo-sparkles/setup-secrets.sh:49 no
0.85 critical demo-sparkles/teardown-secrets.sh::wrangler_cmd demo-sparkles/teardown-secrets.sh:30 no
0.80 high demo-sparkles/teardown-secrets.sh::need_cmd demo-sparkles/teardown-secrets.sh:23 no
0.80 high demo-sparkles/teardown-secrets.sh::delete_secret demo-sparkles/teardown-secrets.sh:56 no
0.60 medium demo-sparkles/setup-secrets.sh::github_token_ok demo-sparkles/setup-secrets.sh:101 no
0.55 medium demo-sparkles/setup-secrets.sh::wrangler_creds_present demo-sparkles/setup-secrets.sh:67 no
0.55 medium demo-sparkles/teardown-secrets.sh::wrangler_creds_present demo-sparkles/teardown-secrets.sh:39 no

Affected execution flows

  • put_secret — criticality 0.62, 4 node(s) across 1 file(s)
  • delete_secret — criticality 0.62, 3 node(s) across 1 file(s)

Test gaps

  • demo-sparkles/setup-secrets.sh::redact (demo-sparkles/setup-secrets.sh:23)
  • demo-sparkles/setup-secrets.sh::need_cmd (demo-sparkles/setup-secrets.sh:33)
  • demo-sparkles/setup-secrets.sh::wrangler_cmd (demo-sparkles/setup-secrets.sh:40)
  • demo-sparkles/setup-secrets.sh::put_secret (demo-sparkles/setup-secrets.sh:49)
  • demo-sparkles/setup-secrets.sh::wrangler_creds_present (demo-sparkles/setup-secrets.sh:67)
  • ...and 5 more without direct tests

Token savings: this graph-backed report used ~10,157 fewer tokens (~78%) than reading every changed file in full (estimated, chars/4 approximation).


Powered by code-review-graph — local-first analysis; no code leaves the CI runner.

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.

1 participant