Spaces:
Running
Running
|
Download scripts/README.md from karlexmarin/taf-agent: direct link, hf CLI and curl.
- Browser
- Download file 2.71 kB
-
https://huggingface.co/spaces/karlexmarin/taf-agent/resolve/main/scripts/README.md
- Command line
-
hf download hf://spaces/karlexmarin/taf-agent/scripts/README.md
-
curl -L -o README.md https://huggingface.co/spaces/karlexmarin/taf-agent/resolve/main/scripts/README.md
2.71 kB
| # scripts/ | |
| ## Resolver follow-up checks | |
| `npm run test:resolver-observations` checks all routes and languages in an | |
| intercepted offline browser. `npm run test:fitcheck-demo` verifies the saved | |
| Fit Check budget and its failure boundary. Both also run from the resolver | |
| browser suite. No model weights or HF metadata are required. | |
| ## Resolver video | |
| `record_resolver_video.mjs` records the deployed app's automatic English demo in | |
| an isolated browser. `build_resolver_video.py` adds English synthetic narration, | |
| an opening/closing card and four subtitle tracks. See the | |
| [media README](../media/resolver/README.md) for provenance and regeneration. | |
| ## `build_sitemaps.py` | |
| Regenerate public XML sitemaps with `python scripts/build_sitemaps.py --taf-root .`. | |
| Use `--guide-root /path/to/rendered/guide` for the ES/EN guide, or `--check` to | |
| detect drift without writing. See [sitemap maintenance](../docs/sitemaps.md). | |
| ## `check_lean_manifest.py` | |
| Cross-checks `data/lean_status.json` against the actual `lean-taf` Lean source repo. Run before pushing to catch: | |
| - Theorems renamed / deleted in source but still in manifest. | |
| - Line numbers in manifest no longer matching the source declaration (e.g. after a refactor moved theorems). | |
| - New theorems in source not yet captured in manifest. | |
| - Commit-hash drift between manifest and current `lean-taf` HEAD. | |
| ### Usage | |
| ```bash | |
| # default — auto-detects ../lean-taf or ../NeurIPS/lean_taf/taf | |
| python scripts/check_lean_manifest.py | |
| # explicit path | |
| python scripts/check_lean_manifest.py --lean-taf-path /path/to/lean-taf | |
| # rewrite manifest in-place to match source (backs up to .bak first) | |
| python scripts/check_lean_manifest.py --regenerate | |
| ``` | |
| Exit 0 = clean, 1 = drift detected. Suitable as a pre-push hook or CI gate once `lean-taf` is checked out alongside. | |
| ### Workflow | |
| 1. After committing changes in `lean-taf` (renaming a theorem, adding a new one, etc.): | |
| 2. In `tafagent/`, run `python scripts/check_lean_manifest.py` to see what drifted. | |
| 3. If line numbers shifted but theorem set is unchanged: `python scripts/check_lean_manifest.py --regenerate` rewrites in-place. | |
| 4. If new theorems appeared: regenerate captures them with `file`/`line` only — manually fill `claim`, `tactic`, `tags`, etc. before committing. | |
| 5. Commit `data/lean_status.json` to `tafagent`. | |
| ### What `--regenerate` preserves vs overwrites | |
| - **Overwrites**: `file`, `line`, `lean_repo.commit`, `lean_repo.commit_short`. | |
| - **Preserves**: `claim`, `tactic`, `preconditions`, `status`, `tags`, `source`, `ui_badge`, plus `findings`, `groups[].title/id`, `summary`, `ui_bindings`. The schema is rewritten with the same keys — anything not derivable from source is kept verbatim. | |