Skip to content

fix: add build() function to json_goal tracer for explicit loading#121

Closed
sky-rayan wants to merge 2 commits intomainfrom
fix/add-build-function-to-json-goal-tracer
Closed

fix: add build() function to json_goal tracer for explicit loading#121
sky-rayan wants to merge 2 commits intomainfrom
fix/add-build-function-to-json-goal-tracer

Conversation

@sky-rayan
Copy link
Copy Markdown

Summary

Adds a module-level build() function to the json_goal.py tracer to enable explicit loading via the --tracer CLI argument.

Problem

While JsonGoal works as the default tracer, users couldn't explicitly specify it using --tracer json_goal.py:JsonGoal because the loader would return the class itself rather than a properly wrapped TacticExtractor instance. The code expects a TacticExtractorBuilder or an object with a .build() method that returns a TacticExtractor.

Solution

Added a module-level build() function that:

  • Returns BeforeAndAfter(JsonGoal()) - matching the default tracer construction
  • Enables both loading patterns:
    • --tracer json_goal.py (module duck-typing via module.build())
    • --tracer json_goal.py:build (explicit function loading)

Changes

  • Added build() function to rocq-pipeline/src/rocq_pipeline/tracers/json_goal.py
  • Function returns BeforeAndAfter[list[Any]] wrapping a JsonGoal() instance
  • Includes docstring explaining its purpose for dynamic loading

Testing

Users can now explicitly specify the json_goal tracer:
uv run rat trace --tracer json_goal.py:build --task-file tasks.yaml

or

uv run rat trace --tracer json_goal.py --task-file tasks.yaml
Both commands now work correctly and produce the same results as the default tracer behavior.

@skylabs-ai-ci
Copy link
Copy Markdown

skylabs-ai-ci Bot commented Jan 21, 2026

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Base commit PR
fmdeps/rocq-agent-toolkit/ fix/add-build-function-to-json-goal-tracer 35f3d80 e382d85 #121

Passive Repos

Repo Job Branch Job Commit
./ main f1faa4e
fmdeps/BRiCk/ main b62cb51
fmdeps/auto/ main 2a53fc0
fmdeps/auto-docs/ main b22de96
bluerock/NOVA/ skylabs-proof 220d4a8
bluerock/bhv/ skylabs-main 20ba397
fmdeps/brick-libcpp/ main 204cf18
fmdeps/ci/ main 68178de
vendored/elpi/ skylabs-master aa4475f
fmdeps/fm-ci/ main cfedfa4
fmdeps/fm-tools/ main 6e85551
psi/protos/ main 8fe3e7c
psi/backend/ main e4c1411
psi/ide/ main 6b596cf
psi/data/ main 5ffc18c
vendored/rocq/ skylabs-master 6d192b5
vendored/rocq-elpi/ skylabs-master e7c8227
vendored/rocq-equations/ skylabs-main 737fdf9
vendored/rocq-ext-lib/ skylabs-master 8172052
vendored/rocq-iris/ skylabs-master 51c753a
vendored/rocq-lsp/ skylabs-main a8b7272
vendored/rocq-stdlib/ skylabs-master 10bd9d7
vendored/rocq-stdpp/ skylabs-master 8307c10
fmdeps/skylabs-fm/ main 9de54e4
vendored/vsrocq/ skylabs-main 39c9c5b

Performance

Relative Master MR Change Filename
-0.00% 121503.0 121503.0 -0.0 total
-0.00% 24210.1 24210.1 -0.0 ├ translation units
+0.00% 97292.9 97292.9 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
-0.00% 121503.0 121503.0 -0.0 total
-0.00% 24210.1 24210.1 -0.0 ├ translation units
+0.00% 97292.9 97292.9 +0.0 └ proofs and tests

@skylabs-ai-ci
Copy link
Copy Markdown

skylabs-ai-ci Bot commented Jan 21, 2026

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Base commit PR
fmdeps/rocq-agent-toolkit/ fix/add-build-function-to-json-goal-tracer d6c26df e382d85 #121

Passive Repos

Repo Job Branch Job Commit
./ main f1faa4e
fmdeps/BRiCk/ main b62cb51
fmdeps/auto/ main 2a53fc0
fmdeps/auto-docs/ main b22de96
bluerock/NOVA/ skylabs-proof 220d4a8
bluerock/bhv/ skylabs-main 20ba397
fmdeps/brick-libcpp/ main 204cf18
fmdeps/ci/ main 68178de
vendored/elpi/ skylabs-master aa4475f
fmdeps/fm-ci/ main cfedfa4
fmdeps/fm-tools/ main 6e85551
psi/protos/ main 8fe3e7c
psi/backend/ main e4c1411
psi/ide/ main 6b596cf
psi/data/ main 5ffc18c
vendored/rocq/ skylabs-master 6d192b5
vendored/rocq-elpi/ skylabs-master e7c8227
vendored/rocq-equations/ skylabs-main 737fdf9
vendored/rocq-ext-lib/ skylabs-master 8172052
vendored/rocq-iris/ skylabs-master 51c753a
vendored/rocq-lsp/ skylabs-main a8b7272
vendored/rocq-stdlib/ skylabs-master 10bd9d7
vendored/rocq-stdpp/ skylabs-master 8307c10
fmdeps/skylabs-fm/ main 9de54e4
vendored/vsrocq/ skylabs-main 39c9c5b

Performance

Relative Master MR Change Filename
-0.00% 121503.0 121503.0 -0.0 total
-0.00% 24210.1 24210.1 -0.0 ├ translation units
+0.00% 97292.9 97292.9 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
-0.00% 121503.0 121503.0 -0.0 total
-0.00% 24210.1 24210.1 -0.0 ├ translation units
+0.00% 97292.9 97292.9 +0.0 └ proofs and tests

@gmalecha-at-skylabs
Copy link
Copy Markdown
Contributor

This is probably a good PR, but @Janno has changed a lot of code there. @Janno can you review this PR and see what should ultimately happen with it?

Copy link
Copy Markdown
Contributor

@Janno Janno left a comment

Choose a reason for hiding this comment

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

Looks good. I'll rebase my branch on top of this one once it gets in.

@jhaag-skylabs-ai
Copy link
Copy Markdown
Contributor

@Janno do we still need this or has it been subsumed by #125?

@Janno
Copy link
Copy Markdown
Contributor

Janno commented Mar 3, 2026

Sorry, I did not see the ping. I think it is fully subsumed by #125.

@jhaag-skylabs-ai
Copy link
Copy Markdown
Contributor

Closing (cf. Janno's note); feel free to reopen if necessary.

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.

4 participants