Commit 00a4952
Prep changes for build and run (#1)
* Add CLAUDE.md files for root and all first-level subsystems
Documents project overview, OTP supervision tree, coding conventions,
known bugs (nref_server allocate_nrefs atom bug, missing sfiles module),
and per-subsystem architecture for graphdb, Database, Dictionary, and Nref Server.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix three known bugs in nref_server and dictionary_imp
- nref_server:get_another_nref_block/0: fix atom `allocate_nrefs` to
proper call `nref_allocator:allocate_nrefs()`
- nref_server:initialize/1: replace incorrect `dets:init_table/3` with
`dets:insert/2`; unused File arg prefixed with _
- dictionary_imp:start_dictionary/2: replace non-existent
`sfiles:file_exists/2` with local `file_exists/2`
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Modernize project: adopt rebar3 umbrella OTP layout
- Restructure source into apps/ umbrella layout per OTP conventions:
each sub-system (nref, database, graphdb, dictionary, seerstone)
becomes a proper OTP application under apps/<name>/src/
- Add .app.src resource files for all five applications; declare
correct dependency chain: seerstone -> nref + database,
database includes graphdb and dictionary
- Add rebar.config with debug_info, relx release config (dev + prod
profiles), and Makefile with targets: compile, clean, shell, release,
and a rebar3 bootstrap target (curl download)
- Update .gitignore: add *.rel, *.script, *.tar.gz, *.dets,
erl_crash.dump, _build/, log/
- Fix nref_server.erl bug: bare atom allocate_nrefs -> nref_allocator:allocate_nrefs()
- Fix nref_server.erl bug: dets:init_table/3 -> dets:insert/2 in initialize/1
- Fix nref_include.erl: same get_another_nref_block/0 fix as nref_server
- Fix dictionary_imp.erl: sfiles:file_exists/2 -> local file_exists/2
- Update apps/nref/CLAUDE.md: mark fixed bugs, document gen_server
wrapper NYI for nref_allocator and nref_server, update compile paths
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* .idea folder ignored.
* Fix two compile errors found on first rebar3 compile
- nref_allocator.erl: fix syntax error — `nref_allocator.dets` is not
valid Erlang (looks like a module-qualified expression); changed to
the string "nref_allocator.dets" to correctly express the filename
- nref_include.erl: fix unreachable clause in check_file/1 — clause 2
used [H|_] (discards tail) making clause 3 dead code; collapsed into
a single [H|T] clause with a case on dets:open_file/2 to correctly
iterate through the candidate file list, trying the next file if the
current one is already open or errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Update nref CLAUDE.md: record two additional fixed bugs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Convert nref_allocator and nref_server to gen_server; fix nref_sup
Both modules were plain DETS API modules with no start_link/0, making
them unsupervisable. This commit completes Dallas's stated intent
(-behaviour(gen_server) was commented out in nref_server.erl).
nref_allocator:
- Add -behaviour(gen_server) and start_link/0
- Public API functions become thin gen_server:call/2 wrappers
- Internal DETS logic moved to do_* private functions called from
handle_call/3; open/0 and close/0 become private (init/terminate)
- handle_cast/2 and handle_info/2 use ?UEM; code_change/3 uses ?NYI
nref_server:
- Same gen_server conversion as nref_allocator
- open/1, close/0, initialize/1 become private (called from init/terminate)
- Default DETS filename: "nref_server.dets"
- Internal logic moved to do_* private functions
nref_sup:
- Add nref_allocator as first child (must start before nref_server)
Smoke tested: application:start(nref) succeeds; nref_server:get_nref/0
returns correct sequential nrefs (1, 2, ...).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add graphdb worker stubs: mgr, rules, attr, class, instance, language
graphdb_sup.erl referenced six worker modules that did not exist, causing
a compile-time missing-module error. This commit adds a gen_server stub
for each, following Dallas's coding conventions (copyright header,
revision history, NYI/UEM macros, behaviour declaration).
Each stub:
- Exports start_link/0 (required by graphdb_sup childspec)
- init/1 returns {ok, []} so the supervision tree starts cleanly
- handle_call/3, handle_cast/2, handle_info/2 use ?UEM to signal any
unexpected use before real implementation is written
- terminate/2 returns ok; code_change/3 uses ?NYI
Modules and their intended roles:
graphdb_mgr — primary coordinator for graphdb operations
graphdb_rules — storage and enforcement of graph rules
graphdb_attr — node/edge attribute management
graphdb_class — class/type/schema definitions
graphdb_instance — creation and retrieval of graph node/edge instances
graphdb_language — graph query language parsing and execution
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Implement no-op app lifecycle callbacks in all five app modules
start_phase/3, prep_stop/1, stop/1, and config_change/3 were ?NYI stubs
in seerstone, database, graphdb, dictionary, and nref. They caused
exit(nyi) errors on every clean shutdown, polluting logs and obscuring
real problems.
- start_phase/3 -> ok (only called if start_phases in .app; none defined)
- prep_stop/1 -> State (pass state through unchanged)
- stop/1 -> ok (no cleanup needed at this stage)
- config_change/3 -> ok (no runtime config change handling yet)
Verified: application:start(nref) + get_nref/0 + application:stop(nref)
now produces no NYI output.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add TASKS.md: full inventory of remaining implementation work
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add rebar.lock for reproducible dependency versions
* Add dictionary_server and term_server stubs; update README and TASKS
- Create apps/dictionary/src/dictionary_server.erl and term_server.erl
as gen_server stubs following the graphdb worker pattern; both are
required by dictionary_sup and their absence previously blocked the
dictionary application from starting
- Rewrite README.md with full setup instructions, supervision tree
diagram, make target reference, and contributing guide
- Mark TASKS item 1 complete in TASKS.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add Erlang CI workflow
Runs rebar3 compile on push to main/develop and on PRs targeting main.
Uses erlef/setup-beam with OTP 27 and rebar3 3.24, with _build caching
keyed on rebar.lock for fast incremental builds.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Ignore .claude/settings.local.json
Machine-specific Claude Code settings should not be shared across
developer environments.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Replace export_all with explicit export list in dictionary_imp
The explicit -export([...]) list was already present; removing
-compile(export_all) restores the compiler's ability to warn about
unused functions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Mark Task 2 complete in TASKS.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent fdfac2c commit 00a4952
8 files changed
Lines changed: 418 additions & 35 deletions
File tree
- .github/workflows
- apps/dictionary/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 9 | + | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 19 | + | |
29 | 20 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 21 | + | |
| 22 | + | |
40 | 23 | | |
41 | 24 | | |
42 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
0 commit comments