-
Notifications
You must be signed in to change notification settings - Fork 1
Tracer: observed-first replay_case v2, bundle export/runtime, CLI, and remove generated fixtures
#118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracer: observed-first replay_case v2, bundle export/runtime, CLI, and remove generated fixtures
#118
Conversation
|
@codex, please review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d66581448
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| tx = _MoveTransaction(git_ops) | ||
| try: | ||
| tx.move(from_case, to_case) | ||
| if from_expected.exists(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make overwrite actually replace existing targets
When fixture-demote runs with --overwrite, it skips the existence checks but still calls _GitOps.move, which uses git mv without -f. git mv -h states -f, --force is required to move/rename even if the target exists, so in the default git_mode=auto a tracked destination fixture will cause the demotion to fail exactly when overwrite is requested. Consider deleting the destination before moving or using git mv -f when overwrite is set.
Useful? React with 👍 / 👎.
Motivation
observed/observed_errorand dependencies for deterministic replay bundles rather than embeddingexpectedoutcomes.Description
replay_pointAPI withlog_replay_case(...)(v2) that validates inputs, enforces XOR ofobserved/observed_error, and requires structuredrequiresentries insrc/fetchgraph/replay/log.py.src/fetchgraph/replay/export.pyto selectreplay_caseevents, produce.case.jsonbundle files viawrite_case_bundle, resolverequireswithcollect_requires, copy resource files withcopy_resource_files, and add multi-export helperexport_replay_case_bundles.load_case_bundleandrun_caseandReplayContextenhancements insrc/fetchgraph/replay/runtime.pyto load bundles and resolve resource paths for handlers.tracerfacade package (src/fetchgraph/tracer/*) with handler hub, CLI (fetchgraph-tracerentry point), validatorvalidate_plan_normalize_spec_v1, and Makefile/pyproject.tomlwiring (fetchgraph-tracerscript andtracer-exportMake target).src/fetchgraph/cli.pyand Makefile to targettests/fixtures/replay_casesand the newexport-case-bundlesemantics.tests/test_replay_fixtures.pyto use.case.jsonbundles: fixed cases assert exactexpectedequality and known_bad cases validate that the handler output fails the validator.tests/fixtures/replay_casesand add.gitkeepplaceholders plustests/fixtures/replay_cases/README.mddocumenting local regeneration.Testing
pytestwas not invoked in the rollout.tests/test_replay_fixtures.pynow targetstests/fixtures/replay_cases/*.case.jsonand distinguishesfixedvsknown_badflows but requires regenerated bundles to be present for full verification.tests/fixtures/replay_cases/.gitkeepandREADME.md), and test runs will be skipped until bundles are recreated locally.Codex Task