Skip to content

feat(fixtures): introduce deterministic scenario bundles - #78

Merged
knytcomics-ui merged 2 commits into
Gryd-lock:mainfrom
Okorie2000-code:feat/scenario-bundles
Aug 18, 2026
Merged

feat(fixtures): introduce deterministic scenario bundles#78
knytcomics-ui merged 2 commits into
Gryd-lock:mainfrom
Okorie2000-code:feat/scenario-bundles

Conversation

@Okorie2000-code

Copy link
Copy Markdown
Contributor

Closes #68

Summary

Introduces versioned scenario bundles for deterministic multi-transaction attack workflows.

Changes

  • Added versioned scenario schema (schema_version 1.0, unsupported versions fail loudly)
  • Added participant/destination/transaction references with missing/malformed/unknown validation
  • Added deterministic step ordering validation (no duplicate ids/sequences, no filesystem/object-order dependence)
  • Added expected state/warning validation (risk_pattern categories + label severity, warning expected/not-expected)
  • Added deterministic offline replay CLI (npm run replay -- scenarios/<file>.json), synthetic-only, no network
  • Added executable synthetic attack scenario (scenarios/phishing-drain.json)
  • Preserved existing point fixture compatibility (destinations.json, scores.json, transactions/*.xdr untouched)
  • Added validation, replay, and backward-compatibility regression tests (46 tests, Node built-in runner, zero new dependencies)
  • Documented scenario format and replay workflow (scenarios/README.md, README.md, CONTRIBUTING.md, CHANGELOG.md)
  • Fixed pre-existing mojibake corruption in scripts/check-secrets.mjs that broke the CI secret-check job

Verification

  • Tests: PASS (46/46)
  • Lint: N/A (no linter configured in this data repo)
  • Type check: N/A (no TypeScript in this repo)
  • Build: N/A (no build step in this repo)
  • Scenario replay: PASS
  • Fixture validation: PASS
  • Secret check: PASS

Closes #68

Okorie2000-code and others added 2 commits August 17, 2026 14:40
Adds versioned scenario bundles for deterministic, offline, multi-transaction
attack workflows. Scenarios reference existing destinations/transactions by
stable id and declare ordered steps with machine-checkable expected warnings
and state transitions, replayed via a new CLI command.

Existing point fixtures (destinations.json, scores.json, transactions/*.xdr)
are unchanged and remain directly loadable by downstream consumers.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Two lines were committed with mojibake (stray backslashes and a mangled
em dash), making the script fail with a SyntaxError and breaking the CI
secret-check job. Restores the intended template-literal error message
and the em-dash log line.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@knytcomics-ui
knytcomics-ui merged commit 7c13340 into Gryd-lock:main Aug 18, 2026
3 checks passed
@knytcomics-ui

Copy link
Copy Markdown
Contributor

wonderful work

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.

Introduce scenario bundles for multi-transaction attack workflows

2 participants