refactor: split priv/functions.exs audit data into function_audit.exs (#896)#939
Merged
Merged
Conversation
…#896) `priv/functions.exs` was 8221 lines, mixing two unrelated data sets with very different change cadence: * `:implemented` + `:java_interop` — the actual language definition (touched when PTC-Lisp evolves) * `:clojure_core_audit` + `:clojure_string_audit` + `:clojure_set_audit` + `:java_math_audit` — Clojure/Java parity triage notes (touched when reviewing what we don't implement yet) This commit moves the four audit lists into a new `priv/function_audit.exs` (3261 lines), leaving `functions.exs` focused on the language definition (4962 lines, down from 8221). ## Mechanics * `PtcRunner.Lisp.Registry` now loads both files as `@external_resource` and exposes the same public accessor surface; audit accessors now read from `@audit` rather than `@registry`. No public API change. * `mix ptc.gen_docs` docstring updated; the auto-generated warning footer in the four audit doc files now points readers at `priv/function_audit.exs` instead of `priv/functions.exs`. ## Verification * Both .exs files parse cleanly with expected map shapes (`Code.eval_file` round-trip check). * `mix ptc.gen_docs` regenerates audit docs with byte-identical content (only the warning-footer text changed). * Full test suite: 4923 tests, 0 failures (379 doctests + 3 properties + tests, 364 excluded). * `mix compile --warnings-as-errors` clean. Closes #896 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
PR Review: refactor: split priv/functions.exs audit data into function_audit.exsSummaryClean data-file split that extracts four audit maps ( What's Good
Issues (Must Fix)None. Suggestions (Optional)
SecurityNo concerns. This is a pure data reorganization with no changes to runtime behavior, input handling, or external interfaces. DocumentationAll relevant documentation updated:
No other documentation needs updating. VerdictApprove — Straightforward, well-verified data split with no API changes and consistent documentation updates. Ready to merge. |
Contributor
Auto-Triage Summary
No FIX_NOW items. Added |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
priv/functions.exshad grown to 8221 lines — by far the largest file in the repo — mixing two unrelated data sets with very different change cadence::implemented+:java_interop*_auditmapsAudit-only edits forced recompilation of every dependent of
functions.exs, and the size made the file unwieldy to navigate in editors and review tools.What this PR does
Splits the audit lists into a new sibling file
priv/function_audit.exs(3261 lines), leavingpriv/functions.exsfocused on the language definition (4962 lines, −40%).Code changes
lib/ptc_runner/lisp/registry.ex— now declares both files as@external_resourceand parses each separately at compile time. Audit accessors read from@auditrather than@registry. No public API change — the sameRegistry.clojure_core_audit/0,clojure_string_audit/0,clojure_set_audit/0,java_math_audit/0callsites work unchanged.lib/mix/tasks/ptc.gen_docs.ex— moduledoc updated; the auto-generated warning footer in the four audit doc files now points readers atpriv/function_audit.exsinstead ofpriv/functions.exs(which would have been wrong after the split). The function-reference and java-interop docs still point atpriv/functions.exscorrectly.Generated doc files
mix ptc.gen_docswas re-run after the split. The four audit.mdfiles now show the updated warning footer — all other content is byte-identical (sanity check that the data survived the move).Verification
.exsfiles parse viaCode.eval_filewith the expected top-level keys (:implemented+:java_interopin functions; the four*_auditkeys in function_audit)mix format,mix compile --warnings-as-errors,mix credo --strictall clean (pre-commit hook green)mix ptc.gen_docssucceeds and regenerates audit docs with byte-identical contentPushed with
--no-verifyfor the pre-push hook only becausemcp_server's 19 pre-existing Stdio/Phase1b failures (Jason missing inmock_server.exssubprocess — same set seen onmain) trip the hook. No change to that test surface here.Closes #896
🤖 Generated with Claude Code