ProjectStateStore.write_project always fails: it calls DotProjectWriter.write(), which has never existed
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with write_project and write_maintainers in packages/darnit/src/darnit/stores/defaults/project.py (lines 61-71 and 86), and confirm the AttributeError by running mypy on that file. The methods also appear in the ProjectStateStore Protocol in darnit/stores/protocols.py and in the in-memory store. Check tests/darnit/stores/test_us1_equivalence.py and tests/darnit/context_integrity/test_single_writer.py. Done when the methods are gone from the Protocol and both implementations, and those tests pass, but the removal-versus-routing choice still needs a maintainer decision.
Written by the indexing model from the issue text.
Description
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 throughdarnit.config.context_writes(feature 042, the single writer). - The only test that calls
write_project(tests/darnit/stores/test_us1_equivalence.py) usesInMemoryProjectStateStorefrom darnit-testchecks. The filesystem implementation has never run. - CI's type check runs mypy on two files with
|| true. Onproject.pyalone, 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.
- Dominant language
- Python
- Stars
- 22
- Forks
- 27
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 35
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from darnitdevorg/darnit
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
darnitdevorg/darnit#587 ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
darnitdevorg/darnit#585 ·
Maintainers usually reply within 1 day
-
quality
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
darnitdevorg/darnit#523 ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
darnitdevorg/darnit#516 ·
Maintainers usually reply within 1 day
-
good first issue module-core
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
darnitdevorg/darnit#506 ·
Maintainers usually reply within 1 day
All issues in darnitdevorg/darnit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
vllm-project/vllm#61131 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
kubernetes-client/python#2735 ·
Maintainers usually reply within 1 day
-
desktop help wanted test
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
docs pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pydantic/pydantic-ai#10113 ·
Maintainers usually reply within 1 day
-
Tutorial unit test leaks sample data into tutorial doctestPossibly taken @Gambit-Checkmate claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100