Repository navigation
Comparing changes
Open a pull request
base repository: NovusEdge/docket
base: main
head repository: NovusEdge/docket
compare: feat/docket-package
- 5 commits
- 31 files changed
- 1 contributor
Commits on Sep 13, 2026
-
refactor: make lib/ a docket package with absolute imports
Six flat modules under lib/ reached by four different import forms, which no module-level import could satisfy. Four sites paid for it: two try/except ImportError pairs and two runtime importlib.import_module calls that mutated sys.path to find lib.docket_ledger. Every import is now absolute against the package. bin/docket puts the repo root on sys.path instead of lib/, so one module has one canonical name from every entry point. The four workaround sites are gone. version() and a ROOT constant move to docket/__init__.py. Both callers read ROOT rather than recomputing parent.parent, which resolves differently depending on the importing module's depth. The CLI stays whole in bin/docket, including its ten deliberately lazy function-body imports. Splitting it is the next step. Signed-off-by: NovusEdge <[email protected]> Signed-off-by: NovusEdge <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f8bb94 - Browse repository at this point
Copy the full SHA 2f8bb94View commit details -
refactor: extract docket/env.py from the CLI
Ledger location and author resolution sat in bin/docket, so the command groups that step 3 splits out would each have reached back into the entry point for them. They move to docket/env.py unchanged. retired_by stops being shadowed. bin/docket imported the ledger's version and then redefined it one screen later; the two differ, because the ledger's subscripts "supersedes" and raises KeyError on an entry project() has not filled in. env.py keeps the tolerant one and says why. Delete run_prefix and next_id. Neither has a caller anywhere in the repo. Signed-off-by: NovusEdge <[email protected]> Signed-off-by: NovusEdge <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1d90287 - Browse repository at this point
Copy the full SHA 1d90287View commit details -
refactor: split the CLI into docket/cli modules
bin/docket held 1408 lines behind a shebang, reachable only through SourceFileLoader. Three test files loaded it that way to call its functions. term.py owns the colour and glyph primitives because cmd_list and the graph renderer both need them; either one owning them would have created a cycle between env and graph. graph.py takes the forest and rail renderer whole. query.py, record.py and admin.py take the commands that read, write and administer. bin/docket is now the launcher. Two paths were derived from __file__ and silently broke on the move. _graph_viewer_path and cmd_update both computed parent.parent, which named the checkout from bin/ and names docket/ from docket/cli/. Both read docket.ROOT now. No test caught either: every test that reaches the viewer patches the function, and the update test recomputed the same wrong path. The eight function-body imports stay inside their functions. A SessionStart hook runs this on every session and must not pay for docket.context, docket.migrate or docket.update unless a command asks for them. Signed-off-by: NovusEdge <[email protected]> Signed-off-by: NovusEdge <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e8c8fc4 - Browse repository at this point
Copy the full SHA e8c8fc4View commit details -
chore: repoint ledger scopes at the docket package
Scope decides which records a briefing surfaces, so 37 records pointed at paths the rename emptied. A briefing taken while editing docket/context.py surfaced none of the four records about it. The lib/ entries rewrite mechanically. The bin/docket entries do not: that file still exists as the launcher, so each of the fifteen was routed by what its record is about. d80 and d82 decide what the entry point is and keep it. Rewriting scope also moves text scoring, because the briefing folds scope into its searchable text and weights terms by inverse document frequency across the whole ledger. The term "docket" is now commoner and "lib" is gone. scripts/rescope_ledger.py asserts no record count. The ledger grew by nine records while the refactor was underway. Signed-off-by: NovusEdge <[email protected]> Signed-off-by: NovusEdge <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 22610e7 - Browse repository at this point
Copy the full SHA 22610e7View commit details -
fix: address review findings on the package refactor
Reroute five ledger records. The first pass assigned d14, d16, d43, d44 and d45 to the CLI by mechanical substitution rather than by subject. d14 decides which harnesses ship config, so it belongs on docs/installation.md. d16 puts defects in GitHub issues. d43, d44 and d45 decide the record and context model, which docket/** already covers. The script is idempotent now. Restore the migrate_ledger error path. docket.migrate pulls docket.ledger at module scope, so a broken install raised ImportError before main() existed to turn it into the handled message it printed before. Repoint the context-format experiment at docket/context.py. Its "scoped" rows passed a path the rename emptied, so both silently measured the unscoped case. The synthetic paths in context-scale and in the golden fixtures stay: those match their own generated ledgers. Signed-off-by: NovusEdge <[email protected]> Signed-off-by: NovusEdge <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 66222f8 - Browse repository at this point
Copy the full SHA 66222f8View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...feat/docket-package