Skip to content

Replace Cache with Event object in callbacks#45

Merged
ngan merged 3 commits intomainfrom
np-callback-event-object
Apr 7, 2026
Merged

Replace Cache with Event object in callbacks#45
ngan merged 3 commits intomainfrom
np-callback-event-object

Conversation

@ngan
Copy link
Copy Markdown
Collaborator

@ngan ngan commented Apr 7, 2026

Summary

  • Introduces FixtureKit::Event which wraps the fixture and exposes identifier (cache key) and path (source file where the definition block was defined)
  • Adds Definition#source_location to expose the block's source file path
  • Replaces the Cache object passed to callbacks in v0.13.0 with the new Event object
  • Updated all specs, reference docs, and wiki

Test plan

  • All 156 specs pass (4 new: Event spec, Definition#source_location spec, fixture event integration spec)
  • Verify in consuming apps that callbacks are updated to use event.identifier / event.path

🤖 Generated with Claude Code

ngan and others added 3 commits April 7, 2026 08:00
Introduces FixtureKit::Event, which wraps the fixture and exposes
identifier (cache key) and path (source location of the definition
block). This gives callback subscribers the definition file path,
which was the original motivation for the change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ngan ngan merged commit 2c012a2 into main Apr 7, 2026
8 checks passed
@ngan ngan deleted the np-callback-event-object branch April 7, 2026 15:38
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