You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ProjectStateStore.write_project always fails: it calls DotProjectWriter.write(), which has never existed #574
FilesystemProjectStateStore.write_project (packages/darnit/src/darnit/stores/defaults/project.py:61-71) calls DotProjectWriter(...).write(config). DotProjectWriter has never had a write() method, only update(dict); no commit in dot_project.py's history adds one. So write_project, and write_maintainers, which calls it at line 86, always raise StoreOperationError (wrapping an AttributeError).
It has been broken since the store was added in feature 033 (f24a554, 2026-08-26). Nobody noticed because:
No production code calls either method. The audit only reads from the project store (tools/audit.py:892), and real .project/ writes go through darnit.config.context_writes (feature 042, the single writer).
The only test that calls write_project (tests/darnit/stores/test_us1_equivalence.py) uses InMemoryProjectStateStore from darnit-testchecks. The filesystem implementation has never run.
CI's type check runs mypy on two files with || true. On project.py alone, mypy reports "DotProjectWriter" has no attribute "write" [attr-defined].
Users aren't affected today. But ProjectStateStore.write_project / write_maintainers are part of a plugin-facing Protocol (darnit/stores/protocols.py), so a third-party caller or backend author would build on a method that cannot work.
Proposal: remove write_project and write_maintainers from the ProjectStateStore Protocol and its implementations (filesystem and in-memory). Since feature 042, .project/project.yaml is never written with context values, and context_writes is the only writer (framework-design.md 7.4-7.11, tests/darnit/context_integrity/test_single_writer.py). A generic "write a whole ProjectConfig" method on the store conflicts with that rule.
The alternative is to route them through context_writes with the same restrictions. That keeps a write surface no caller needs.
Found while reviewing #504. A repo-wide audit for other declared-but-unwired interfaces like this one is under way.
Drafted with Claude Code; reviewed and posted by me.
Activity
refactor(core)!: remove dead write methods from ProjectStateStore (fixes