JsonlReporter: #path field is not declared readonly, inconsistent with the rest of the codebase
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 92/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start with src/reporters/jsonl.ts and compare its #path declaration with the readonly fields in the referenced agent and prompt-generator files. Check src/reporters/yaml.ts for the identical declaration. Done means both reporter path fields follow the repository convention; run the existing test suite afterward.
Written by the indexing model from the issue text.
Description
Observed behavior
In src/reporters/jsonl.ts the private path field is declared as a mutable string:
export class JsonlReporter implements Reporter {
// ...
#path: string;
constructor(path: string) {
this.#path = path;
}
// ...
}
Nothing inside the class ever reassigns #path, but the declaration leaves it mutable.
Expected behavior
Per AGENTS.md:
Use
readonlyandReadonlyArray<...>unless the data is designed to be mutable
Every other class in src/ that stores an immutable private field already follows the convention, for example ClaudeSDKAgent in src/agents/claude-sdk.ts:
readonly #config: ClaudeSDKAgentConfig;
The same pattern is used in src/agents/openai-sdk.ts, src/agents/codex-cli.ts, and every src/prompt-generators/*.ts file. JsonlReporter should match.
Minimal reproduction
$ rg "^\s+#\w+: \w+;" src/reporters/
src/reporters/jsonl.ts:24: #path: string;
src/reporters/yaml.ts:24: #path: string;
vs. every other class in src/:
$ rg "^\s+readonly #\w+:" src/ -l | head
src/agents/claude-sdk.ts
src/agents/openai-sdk.ts
src/agents/codex-cli.ts
src/prompt-generators/github.ts
...
Fix
Add readonly to the field declarations in both reporters:
- #path: string;
+ readonly #path: string;
(The YamlReporter in src/reporters/yaml.ts has the identical issue and should be fixed in the same change.)
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 joewalker/loop-the-loop
-
bug S4
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
joewalker/loop-the-loop#88 ·
-
Git exec(): child killed by a signal rejects with new Error('') and loses the signal information Openbug S3
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
joewalker/loop-the-loop#84 ·
-
bug S3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
joewalker/loop-the-loop#83 ·
-
bug S3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
joewalker/loop-the-loop#82 ·
-
bug S4
Difficulty 1/5 Under an hour Newbie friendliness 90/100
joewalker/loop-the-loop#79 ·
All issues in joewalker/loop-the-loop
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·