Architecture refactor: plan + phase 0 (dead code + bugs) (#106)
* Add architecture refactor plan Synthesizes a six-part architectural review into phased, gate-validated cleanup work. Targets LLM-maintainability: one home per feature, no god-files, explicit checked contracts, no copy-paste dispatch. No code changes yet — the plan only. * Refactor phase 0: dead code + isolated bugs Pure cleanup ahead of the structural phases (docs/architecture-refactor-plan.md). No behavior change except the two bug fixes, which are covered by a regression row. Dead code (all verified zero-reference or overridden): - core-resolve / core-satisfies? / core-type->str seed stubs + bindings — resolve and satisfies? are interned by install-stateful-fns! (the seed copies were shadowed); type->str was an inert SCI stub with no callers. - find defined twice in 20-coll.clj; the dead copy returned a plain vector (wrong — the live def at :787 returns a real map-entry) with a comment that contradicted it. - mark-hint (passes.clj), phs-to-struct (phm), shape-vals / ns-imports-fn (types) — unreferenced. - redundant local pad2 in javatime (module-level one already in scope). Bugs: - File.toURL stored :url but every :jolt/url method reads :spec, so a URL from (.toURL file) returned nil from all its methods. Now stores :spec (+ spec row). - pl-rest had a no-op (if (plist? r) r r); collapsed to r. - :map-shapes? was missing from the deps-image cache key — two runs differing only in map-shapes could reuse each other's image. Also dropped read-quote's unused pos param. Full gate green. --------- Co-authored-by: Yogthos <yogthos@gmail.com>
This commit is contained in:
parent
88b7d13401
commit
d1f73f1740
11 changed files with 286 additions and 38 deletions
|
|
@ -107,6 +107,8 @@
|
|||
"(do (require (quote clojure.java.io)) (janet/spit \"/tmp/jolt-lineseq-spec.txt\" \"a\\nb\\n\") (vec (line-seq (clojure.java.io/reader \"/tmp/jolt-lineseq-spec.txt\"))))"]
|
||||
["with-open closes shim" "97"
|
||||
"(with-open [r (StringReader. \"a\")] (.read r))"]
|
||||
["File.toURL methods read it back" "\"file:/tmp/x\""
|
||||
"(do (require (quote clojure.java.io)) (.toString (.toURL (clojure.java.io/file \"/tmp/x\"))))"]
|
||||
["vector :import shares deftype ctor" "\"hi!\""
|
||||
"(do (ns spec.nodea) (defprotocol SpecP (spec-pm [this])) (deftype SpecTN [t] SpecP (spec-pm [this] (str t \"!\"))) (ns spec.nodeb (:import [spec.nodea SpecTN])) (.spec-pm (SpecTN. \"hi\")))"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue