Repository navigation
Conversation
…t, model_names Pure move, no logic edits. The 800-line utils module is split by concern: - dokimi.frontmatter: markdown frontmatter parsing - dokimi.files: InputError, device refusal, JSON input reads, symlink-loop and rmtree-retry helpers - dokimi.digest: text, file and git-aware tree digests - dokimi.model_names: model identity, same-model/evaluator checks and the judge-independence warnings - dokimi.records: question_id moves here beside the record helpers Importers in the package, scripts, fuzz targets and tests point at the new homes directly. dokimi.utils has no shim: it is not public API. The layer map in tests/test_import_architecture.py lists the new foundation modules. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673s4g Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Thread: PRRT_kwDOVBg7g8673s4q Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com> # Conflicts: # dokimi/dokimi/repos/reach.py
Eight command sites hand-rolled "read JSON or InputError": arms _refuse_external_trigger_set, questions _load_questions_json and _read_json_input, personas validate, catalog trigger-probe, report generate, repo scan --baseline and tools preference --groups. Each now calls read_json_input(path, flag=...), so a device or socket is refused with "<flag> <path>: not a file" before it is read, and the messages share one shape. Exit codes stay 2 except one: a JSON file nested past the decoder's recursion limit now exits 2 naming the file. Four of these sites used to let the RecursionError escape to exit 5 with a traceback. Messages change; the Changed fragment lists them. Tests pin the new text, the device refusal for each newly routed flag, and deep nesting. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Open
7 tasks done
This branch has not been deployed
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.
Summary
Local
_read_json_inputand the hand-rolled wrappers are removed. Each site passes its flag, so every file error has one shape:<flag> <path>: <reason>.Behaviour changes (Changed fragment:
changelog.d/20261125_170000_napetrov_arch-r6-6.md)/dev/zero,/dev/null) is refused with<flag> <path>: not a filebefore any read, on every newly routed flag, includingarms runandmatrix-run --questions.cannot read <path>: <reason>/<path> is not valid JSON: <reason>become<flag> <path>: <reason>;cannot load matrix run inputs: <reason>becomes--questions <path>: <reason>;Cannot read/Cannot parse(personas validate) become--file <path>: <reason>.[Errno 2] .... Empty path exits 2 with<flag> "": no file given.questions refineis not routed in this PR.Evidence
test_report_cli_inputs.py,test_personas_approve.py,test_cli_refusal_parity.py,test_arms_output_errors.py.tests/test_input_devices.py: device refusal per flag (7 argv/flag pairs), arms loader refusal, deep nesting exits 2 with no Traceback.make ci-local --offline: test, coverage, mutation and fidelity pass. The one red step, "Repeat changed tests", exited 1 from a pytest temp-dir teardown race intests/test_repo_run.py; the same seed replays green (385 and 94 passed).Merge Danger
Door: two-way. Error text and one exit code change; no persisted format or flag changes.
Blast radius: CLI error messages of eight commands. Scripts that grep the old text or check exit 5 for deep JSON need updating.
🤖 Generated with Claude Code