Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ProjectStateStore.write_project always fails: it calls DotProjectWriter.write(), which has never existed

Open
#574 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@i-am-paradox is already working on this.

Since Oct 11, 2026.

  • #588 by @i-am-paradox — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

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

module-core needs triage

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.

Dominant language
Python
Stars
22
Forks
27
Avg merge
2d 1h
Merged PRs (30d)
35

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from darnitdevorg/darnit

All issues in darnitdevorg/darnit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.