overengineeringstudio / overengineeringstudio/effect-utils
Genie packageJson crashes when a dependency version is undefined
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 121
Description
packageJson(...).stringify(...) crashes in resolveDeps when a dependency map contains an undefined value. The crash is an unstructured TypeError, so the generated failure does not identify the malformed dependency entry.
Reproduction
https://github.com/schickling-repros/2026-06-genie-undefined-dependency-version
bun run repro
The repro uses a synthetic package and imports the public Genie source at commit b0d1daea4e21468f9813f39a234732456d8e2764.
Expected
Genie should report a structured validation/generation error that identifies the dependency key whose version is not a string.
Actual
TypeError: undefined is not an object (evaluating 'version.startsWith')
at resolveDeps (.../packages/@overeng/genie/src/runtime/package-json/mod.ts:414:9)
at buildPackageJson (.../packages/@overeng/genie/src/runtime/package-json/mod.ts:521:21)
at stringify (.../packages/@overeng/genie/src/runtime/package-json/mod.ts:722:11)
Minimal trigger
packageJson({
name: 'synthetic-package',
version: '1.0.0',
dependencies: {
valid: '1.0.0',
malformed: undefined,
} as unknown as Record<string, string>,
}).stringify({ location: '.', cwd: process.cwd() })
Versions
overengineeringstudio/effect-utils:b0d1daea4e21468f9813f39a234732456d8e2764- Bun:
1.3.13 - OS: Linux x64
Posted on behalf of @schickling
| field | value |
|---|---|
agent_name |
🦤 co1-ibis |
agent_session_id |
76ea16d2-32cf-409e-ba81-7933fe38952b |
agent_tool |
Codex CLI |
agent_tool_version |
0.131.0 |
agent_runtime |
Codex CLI 0.131.0 |
agent_model |
unknown |
worktree |
2026-06-genie-undefined-dependency-version/main |
machine |
dev3 |
tooling_profile |
dotfiles@e5e8d75 |
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.
Research direction
Start in packages/@overeng/genie/src/runtime/package-json/mod.ts at resolveDeps around line 414, then follow buildPackageJson and stringify. Run the linked reproduction with bun run repro and verify that an undefined dependency version produces a structured error identifying its dependency key instead of a TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100