Skip to content

Commit 1f02f3c

Browse files
Fix pre-existing test bugs; narrative docs → AsciiDoc; version 0.9.0 (#52)
* fix: repair pre-existing debugger, parser, and incremental-lexer bugs Addresses test failures surfaced by the Hypatia review / ExUnit suite: - debugger: read variable bindings from State.environment (the real field; the code referenced a non-existent State.variables), and add the missing Phronesis.Trace.merge/2 the debugger uses to fold per-node sub-traces. - parser: a parenthesised group now parses the full logical expression, so comparisons and booleans inside parens work, e.g. (is_valid == true AND enabled) -- fixes conformance 04_boolean_logic. - incremental_lexer: clamp the edit window into the source so an out-of-bounds delta can't drive binary_part/3 with a negative length. Net: the local suite goes from 17 to 6 failures with no regressions. The remaining 6 are doc-generator fixture/feature gaps and one LSP incremental re-lex edge case (see PR notes). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqMopxUsgu78rg5fhWBUkk * docs: convert narrative docs to AsciiDoc (CC-BY-SA-4.0); set version 0.9.0 - Convert the top-level narrative documentation from Markdown to AsciiDoc per the estate "docs must be .adoc" policy, licensed CC-BY-SA-4.0: ANALYSIS-COMPLETE, IMPLEMENTATION-ROADMAP, LSP-IMPLEMENTATION-SUMMARY, TEST-NEEDS, TOOLCHAIN-WISHLIST, TOPOLOGY, WOKELANG-FEATURE-COMPARISON. GitHub-required (.md), AI-instruction, issue-template, wiki, and academic proof corpora are intentionally left as-is. - EXPLAINME: update the file-map reference to the renamed LSP summary. - mix.exs: version 0.1.0 -> 0.9.0 to match STATE.a2ml and resolve the three-way version disagreement. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqMopxUsgu78rg5fhWBUkk --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e87d9f0 commit 1f02f3c

20 files changed

Lines changed: 1777 additions & 1532 deletions

ANALYSIS-COMPLETE.adoc

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
// SPDX-License-Identifier: CC-BY-SA-4.0
2+
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
4+
== Phronesis Analysis Complete
5+
6+
=== Task Summary
7+
8+
*User Request:* "I need you to do all that we just did with wokelang...for phronesis"
9+
10+
*What was done for WokeLang (4 features):*
11+
12+
[arabic]
13+
. Record field access with dot notation
14+
. Full stdlib integration with interpreter
15+
. Worker message passing
16+
. Enhanced error messages with hints
17+
18+
=== Analysis Results
19+
20+
==== Feature-by-Feature Comparison
21+
22+
*1. Record Field Access ✅*
23+
24+
* Status: *Already complete in Phronesis*
25+
* Phronesis actually has MORE: optional chaining with `?.` operator
26+
* No work needed
27+
28+
*2. Stdlib Integration ✅*
29+
30+
* Status: *Already complete in Phronesis*
31+
* All 19 stdlib functions (BGP, RPKI, Consensus, Temporal) fully integrated
32+
* `resolve_builtin_module/2` wires all function calls
33+
* No work needed
34+
35+
*3. Worker Concurrency ⚠️*
36+
37+
* Status: *Not applicable to Phronesis*
38+
* Phronesis is a *decidable policy language* (guaranteed termination)
39+
* No loops, no recursion by design
40+
* Workers would break decidability guarantees
41+
* Consensus voting ≠ worker concurrency (it's distributed approval)
42+
* *Architecturally inappropriate to add*
43+
44+
*4. Enhanced Error Messages ✅*
45+
46+
* Status: *Already complete in Phronesis*
47+
* Has comprehensive diagnostics system (967+ lines)
48+
* Features WokeLang doesn't have:
49+
** Error codes (E0001-E9999, W0000-W9999)
50+
** Colorized output with ANSI
51+
** Source context with line highlighting
52+
** Levenshtein distance-based suggestions
53+
** "Did you mean...?" for typos
54+
** JSON export for tool integration
55+
56+
==== What Phronesis Has That WokeLang Doesn't
57+
58+
*Advanced Language Features:*
59+
60+
* Optional chaining: `record?.field?.nested`
61+
* Interpolated strings: `"Hello ${name}"`
62+
* Null-safe field access
63+
* IPv6 address literals
64+
* Raw/multiline strings
65+
66+
*Production Tooling:*
67+
68+
* Full LSP server (1200+ lines)
69+
* Interactive debugger with REPL (1030+ lines)
70+
* Performance profiler (1158+ lines) with HTML/CSV/Markdown export
71+
* Documentation generator (1069+ lines)
72+
* Static analyzer (897+ lines) with security checks
73+
* Package manager (1198+ lines) with dependency resolution
74+
* Comprehensive CLI (12+ commands)
75+
* VSCode extension with full IDE support
76+
* Syntax highlighting for 4 editors
77+
78+
*Infrastructure:*
79+
80+
* Docker deployment (multi-stage build)
81+
* Docker Compose (3-node cluster)
82+
* Kubernetes StatefulSet (production-ready)
83+
* Hot code reloading
84+
* Distributed consensus with Raft
85+
* Performance benchmarks (exceeds 10k ops/sec target on 5/6 components)
86+
87+
=== Conclusion
88+
89+
*No work needed on Phronesis.*
90+
91+
All applicable features from the WokeLang implementation are already complete in Phronesis, and Phronesis has significantly more capabilities:
92+
93+
[cols=",,",options="header",]
94+
|===
95+
|Aspect |WokeLang |Phronesis
96+
|*Record field access* |Basic dot notation |Dot notation + optional chaining
97+
|*Stdlib integration* |96 functions |19 functions (specialized for networking)
98+
|*Error messages* |Design only |Full diagnostics system
99+
|*LSP server* |None |Complete (1200+ lines)
100+
|*Debugger* |None |Interactive with REPL
101+
|*Profiler* |None |Full with multiple export formats
102+
|*Package manager* |None |Complete with semver
103+
|*Production deployment* |None |Docker + K8s ready
104+
|*Project completion* |~30% (basic interpreter) |*100% (production-ready)*
105+
|===
106+
107+
Phronesis is a *production-ready language with comprehensive tooling* that exceeds what was built for WokeLang.
108+
109+
=== Files Created
110+
111+
* `WOKELANG-FEATURE-COMPARISON.adoc` - Detailed feature-by-feature analysis
112+
* `ANALYSIS-COMPLETE.adoc` - This summary document
113+
114+
=== Next Steps
115+
116+
None required. Phronesis already has all applicable features and more.

ANALYSIS-COMPLETE.md

Lines changed: 0 additions & 106 deletions
This file was deleted.

EXPLAINME.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,5 +160,5 @@ cryptographic signing for packages yet.
160160
| `Containerfile` | Podman container definition (Chainguard base)
161161
| `.machine_readable/` | A2ML state, meta, ecosystem files
162162
| `TESTING-REPORT.adoc` | Test results narrative
163-
| `LSP-IMPLEMENTATION-SUMMARY.md` | LSP feature coverage summary
163+
| `LSP-IMPLEMENTATION-SUMMARY.adoc` | LSP feature coverage summary
164164
|===

0 commit comments

Comments
 (0)