llm-mock-server 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/cli.d.ts +3 -0
- package/dist/cli/cli.d.ts.map +1 -0
- package/dist/cli/cli.js +103 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/cli/validators.d.ts +7 -0
- package/dist/cli/validators.d.ts.map +1 -0
- package/dist/cli/validators.js +53 -0
- package/dist/cli/validators.js.map +1 -0
- package/dist/formats/anthropic/index.d.ts +1 -1
- package/dist/formats/anthropic/index.d.ts.map +1 -1
- package/dist/formats/anthropic/index.js +1 -1
- package/dist/formats/anthropic/index.js.map +1 -1
- package/dist/formats/anthropic/parse.d.ts +2 -2
- package/dist/formats/anthropic/parse.d.ts.map +1 -1
- package/dist/formats/anthropic/parse.js +4 -2
- package/dist/formats/anthropic/parse.js.map +1 -1
- package/dist/formats/anthropic/schema.d.ts +1 -1
- package/dist/formats/anthropic/schema.d.ts.map +1 -1
- package/dist/formats/anthropic/schema.js +9 -4
- package/dist/formats/anthropic/schema.js.map +1 -1
- package/dist/formats/anthropic/serialize.d.ts +2 -2
- package/dist/formats/anthropic/serialize.d.ts.map +1 -1
- package/dist/formats/anthropic/serialize.js +76 -19
- package/dist/formats/anthropic/serialize.js.map +1 -1
- package/dist/formats/openai/chat-completions/index.d.ts +3 -0
- package/dist/formats/openai/chat-completions/index.d.ts.map +1 -0
- package/dist/formats/openai/chat-completions/index.js +13 -0
- package/dist/formats/openai/chat-completions/index.js.map +1 -0
- package/dist/formats/openai/chat-completions/parse.d.ts +4 -0
- package/dist/formats/openai/chat-completions/parse.d.ts.map +1 -0
- package/dist/formats/openai/chat-completions/parse.js +33 -0
- package/dist/formats/openai/chat-completions/parse.js.map +1 -0
- package/dist/formats/openai/chat-completions/schema.d.ts +93 -0
- package/dist/formats/openai/chat-completions/schema.d.ts.map +1 -0
- package/dist/formats/openai/chat-completions/schema.js +74 -0
- package/dist/formats/openai/chat-completions/schema.js.map +1 -0
- package/dist/formats/openai/chat-completions/serialize.d.ts +10 -0
- package/dist/formats/openai/chat-completions/serialize.d.ts.map +1 -0
- package/dist/formats/openai/chat-completions/serialize.js +99 -0
- package/dist/formats/openai/chat-completions/serialize.js.map +1 -0
- package/dist/formats/openai/responses/index.d.ts +3 -0
- package/dist/formats/openai/responses/index.d.ts.map +1 -0
- package/dist/formats/openai/responses/index.js +13 -0
- package/dist/formats/openai/responses/index.js.map +1 -0
- package/dist/formats/openai/responses/parse.d.ts +4 -0
- package/dist/formats/openai/responses/parse.d.ts.map +1 -0
- package/dist/formats/openai/responses/parse.js +51 -0
- package/dist/formats/openai/responses/parse.js.map +1 -0
- package/dist/formats/openai/responses/schema.d.ts +103 -0
- package/dist/formats/openai/responses/schema.d.ts.map +1 -0
- package/dist/formats/openai/responses/schema.js +71 -0
- package/dist/formats/openai/responses/schema.js.map +1 -0
- package/dist/formats/openai/responses/serialize.d.ts +10 -0
- package/dist/formats/openai/responses/serialize.d.ts.map +1 -0
- package/dist/formats/openai/responses/serialize.js +273 -0
- package/dist/formats/openai/responses/serialize.js.map +1 -0
- package/dist/formats/request-helpers.d.ts +1 -1
- package/dist/formats/request-helpers.d.ts.map +1 -1
- package/dist/formats/request-helpers.js.map +1 -1
- package/dist/formats/serialize-helpers.d.ts +1 -1
- package/dist/formats/serialize-helpers.d.ts.map +1 -1
- package/dist/formats/serialize-helpers.js +6 -3
- package/dist/formats/serialize-helpers.js.map +1 -1
- package/dist/formats/types.d.ts +2 -1
- package/dist/formats/types.d.ts.map +1 -1
- package/dist/history.d.ts +6 -2
- package/dist/history.d.ts.map +1 -1
- package/dist/history.js +2 -0
- package/dist/history.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +1 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +26 -9
- package/dist/loader.js.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +12 -4
- package/dist/logger.js.map +1 -1
- package/dist/mock-server.d.ts +44 -48
- package/dist/mock-server.d.ts.map +1 -1
- package/dist/mock-server.js +37 -85
- package/dist/mock-server.js.map +1 -1
- package/dist/route-handler.d.ts +1 -1
- package/dist/route-handler.d.ts.map +1 -1
- package/dist/route-handler.js +19 -7
- package/dist/route-handler.js.map +1 -1
- package/dist/rule-builder.d.ts +21 -0
- package/dist/rule-builder.d.ts.map +1 -0
- package/dist/rule-builder.js +58 -0
- package/dist/rule-builder.js.map +1 -0
- package/dist/rule-engine.d.ts +3 -1
- package/dist/rule-engine.d.ts.map +1 -1
- package/dist/rule-engine.js +7 -2
- package/dist/rule-engine.js.map +1 -1
- package/dist/sse-writer.d.ts +1 -1
- package/dist/sse-writer.d.ts.map +1 -1
- package/dist/types/reply.d.ts +51 -8
- package/dist/types/reply.d.ts.map +1 -1
- package/dist/types/request.d.ts +21 -6
- package/dist/types/request.d.ts.map +1 -1
- package/dist/types/rule.d.ts +65 -7
- package/dist/types/rule.d.ts.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +15 -9
- package/.claude/skills/desloppify/SKILL.md +0 -308
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000801.json +0 -242
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000905.json +0 -248
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000917.json +0 -248
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/canonical_import_20260315_000950.json +0 -311
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/claude_launch_prompt.md +0 -17
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.json +0 -255
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/review_result.template.json +0 -22
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/reviewer_instructions.md +0 -20
- package/.desloppify/external_review_sessions/ext_20260315_000339_a6cdc3e6/session.json +0 -20
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/canonical_import_20260315_050000.json +0 -286
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/canonical_import_20260315_050028.json +0 -303
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/claude_launch_prompt.md +0 -17
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/review_result.json +0 -297
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/review_result.template.json +0 -22
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/reviewer_instructions.md +0 -20
- package/.desloppify/external_review_sessions/ext_20260315_045546_0587ea3b/session.json +0 -20
- package/.desloppify/query.json +0 -1312
- package/.desloppify/review_packet_blind.json +0 -1249
- package/.desloppify/review_packets/holistic_packet_20260315_000339.json +0 -1471
- package/.desloppify/review_packets/holistic_packet_20260315_045546.json +0 -1480
- package/.desloppify/review_packets/holistic_packet_20260315_185401.json +0 -1407
- package/.desloppify/review_packets/holistic_packet_20260315_185613.json +0 -1407
- package/.desloppify/state-typescript.json +0 -8438
- package/.desloppify/state-typescript.json.bak +0 -8432
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-1.log +0 -384
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-10.log +0 -484
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-2.log +0 -408
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-3.log +0 -416
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-4.log +0 -360
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-5.log +0 -360
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-6.log +0 -364
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-7.log +0 -428
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-8.log +0 -388
- package/.desloppify/subagents/runs/20260315_185401/logs/batch-9.log +0 -500
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-1.md +0 -83
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-10.md +0 -108
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-2.md +0 -89
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-3.md +0 -91
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-4.md +0 -77
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-5.md +0 -77
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-6.md +0 -78
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-7.md +0 -94
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-8.md +0 -84
- package/.desloppify/subagents/runs/20260315_185401/prompts/batch-9.md +0 -112
- package/.desloppify/subagents/runs/20260315_185401/results/batch-1.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-10.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-2.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-3.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-4.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-5.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-6.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-7.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-8.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/results/batch-9.raw.txt +0 -0
- package/.desloppify/subagents/runs/20260315_185401/run.log +0 -36
- package/.desloppify/subagents/runs/20260315_185401/run_summary.json +0 -156
- package/.desloppify/subagents/runs/20260315_185613/holistic_findings_merged.json +0 -741
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-1.log +0 -579
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-10.log +0 -1537
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-2.log +0 -829
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-3.log +0 -927
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-4.log +0 -429
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-5.log +0 -276
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-6.log +0 -450
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-7.log +0 -730
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-8.log +0 -698
- package/.desloppify/subagents/runs/20260315_185613/logs/batch-9.log +0 -938
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-1.md +0 -83
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-10.md +0 -108
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-2.md +0 -89
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-3.md +0 -91
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-4.md +0 -77
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-5.md +0 -77
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-6.md +0 -78
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-7.md +0 -94
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-8.md +0 -84
- package/.desloppify/subagents/runs/20260315_185613/prompts/batch-9.md +0 -112
- package/.desloppify/subagents/runs/20260315_185613/results/batch-1.raw.txt +0 -78
- package/.desloppify/subagents/runs/20260315_185613/results/batch-10.raw.txt +0 -242
- package/.desloppify/subagents/runs/20260315_185613/results/batch-2.raw.txt +0 -102
- package/.desloppify/subagents/runs/20260315_185613/results/batch-3.raw.txt +0 -94
- package/.desloppify/subagents/runs/20260315_185613/results/batch-4.raw.txt +0 -86
- package/.desloppify/subagents/runs/20260315_185613/results/batch-5.raw.txt +0 -1
- package/.desloppify/subagents/runs/20260315_185613/results/batch-6.raw.txt +0 -87
- package/.desloppify/subagents/runs/20260315_185613/results/batch-7.raw.txt +0 -1
- package/.desloppify/subagents/runs/20260315_185613/results/batch-8.raw.txt +0 -107
- package/.desloppify/subagents/runs/20260315_185613/results/batch-9.raw.txt +0 -67
- package/.desloppify/subagents/runs/20260315_185613/run.log +0 -96
- package/.desloppify/subagents/runs/20260315_185613/run_summary.json +0 -156
- package/.editorconfig +0 -12
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/docs.yml +0 -46
- package/.github/workflows/test.yml +0 -40
- package/.markdownlint.jsonc +0 -11
- package/.node-version +0 -1
- package/.oxfmtrc.json +0 -9
- package/.oxlintrc.json +0 -35
- package/docs/ARCHITECTURE.md +0 -125
- package/scorecard.png +0 -0
- package/src/cli/cli.ts +0 -141
- package/src/cli/validators.ts +0 -68
- package/src/formats/anthropic/index.ts +0 -14
- package/src/formats/anthropic/parse.ts +0 -70
- package/src/formats/anthropic/schema.ts +0 -74
- package/src/formats/anthropic/serialize.ts +0 -179
- package/src/formats/openai/chat-completions/index.ts +0 -14
- package/src/formats/openai/chat-completions/parse.ts +0 -47
- package/src/formats/openai/chat-completions/schema.ts +0 -92
- package/src/formats/openai/chat-completions/serialize.ts +0 -146
- package/src/formats/openai/responses/index.ts +0 -14
- package/src/formats/openai/responses/parse.ts +0 -73
- package/src/formats/openai/responses/schema.ts +0 -86
- package/src/formats/openai/responses/serialize.ts +0 -328
- package/src/formats/request-helpers.ts +0 -56
- package/src/formats/serialize-helpers.ts +0 -43
- package/src/formats/types.ts +0 -26
- package/src/history.ts +0 -70
- package/src/index.ts +0 -46
- package/src/loader.ts +0 -246
- package/src/logger.ts +0 -70
- package/src/mock-server.ts +0 -203
- package/src/route-handler.ts +0 -144
- package/src/rule-builder.ts +0 -73
- package/src/rule-engine.ts +0 -165
- package/src/sse-writer.ts +0 -35
- package/src/types/reply.ts +0 -92
- package/src/types/request.ts +0 -56
- package/src/types/rule.ts +0 -125
- package/src/types.ts +0 -24
- package/test/cli-validators.test.ts +0 -151
- package/test/formats/anthropic.test.ts +0 -336
- package/test/formats/openai.test.ts +0 -316
- package/test/formats/parse-helpers.test.ts +0 -315
- package/test/formats/responses.test.ts +0 -380
- package/test/helpers/make-req.ts +0 -18
- package/test/history.test.ts +0 -361
- package/test/loader.test.ts +0 -333
- package/test/logger.test.ts +0 -344
- package/test/mock-server.test.ts +0 -619
- package/test/rule-engine.test.ts +0 -229
- package/tsconfig.json +0 -24
- package/tsconfig.test.json +0 -11
- package/typedoc.json +0 -9
- package/vitest.config.ts +0 -18
|
@@ -1,579 +0,0 @@
|
|
|
1
|
-
ATTEMPT 1/3
|
|
2
|
-
$ codex exec --ephemeral -C /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server -s workspace-write -c approval_policy="never" -c model_reasoning_effort="low" -o /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/subagents/runs/20260315_185613/results/batch-1.raw.txt You are a focused subagent reviewer for a single holistic investigation batch.
|
|
3
|
-
|
|
4
|
-
Repository root: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server
|
|
5
|
-
Blind packet: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/review_packet_blind.json
|
|
6
|
-
Batch index: 1
|
|
7
|
-
Batch name: Architecture & Coupling
|
|
8
|
-
Batch dimensions: cross_module_architecture, high_level_elegance
|
|
9
|
-
Batch rationale: god modules, import-time side effects
|
|
10
|
-
|
|
11
|
-
Files assigned:
|
|
12
|
-
- src/types.ts
|
|
13
|
-
- src/formats/types.ts
|
|
14
|
-
- src/formats/request-helpers.ts
|
|
15
|
-
- src/logger.ts
|
|
16
|
-
- src/rule-engine.ts
|
|
17
|
-
- src/history.ts
|
|
18
|
-
- test/history.test.ts
|
|
19
|
-
|
|
20
|
-
Task requirements:
|
|
21
|
-
1. Read the blind packet and follow `system_prompt` constraints exactly.
|
|
22
|
-
1a. If previously flagged issues are listed above, use them as context for your review.
|
|
23
|
-
Verify whether each still applies to the current code. Do not re-report fixed or
|
|
24
|
-
wontfix issues. Use them as starting points to look deeper — inspect adjacent code
|
|
25
|
-
and related modules for defects the prior review may have missed.
|
|
26
|
-
1c. Think structurally: when you spot multiple individual issues that share a common
|
|
27
|
-
root cause (missing abstraction, duplicated pattern, inconsistent convention),
|
|
28
|
-
explain the deeper structural issue in the finding, not just the surface symptom.
|
|
29
|
-
If the pattern is significant enough, report the structural issue as its own finding
|
|
30
|
-
with appropriate fix_scope ('multi_file_refactor' or 'architectural_change') and
|
|
31
|
-
use `root_cause_cluster` to connect related symptom findings together.
|
|
32
|
-
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
|
|
33
|
-
3. Return 0-10 high-quality findings for this batch (empty array allowed).
|
|
34
|
-
3a. Do not suppress real defects to keep scores high; report every material issue you can support with evidence.
|
|
35
|
-
3b. Do not default to 100. Reserve 100 for genuinely exemplary evidence in this batch.
|
|
36
|
-
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
|
|
37
|
-
4a. Any dimension scored below 85.0 MUST include explicit feedback: add at least one finding with the same `dimension` and a non-empty actionable `suggestion`.
|
|
38
|
-
5. Every finding must include `related_files` with at least 2 files when possible.
|
|
39
|
-
6. Every finding must include `dimension`, `identifier`, `summary`, `evidence`, `suggestion`, and `confidence`.
|
|
40
|
-
7. Every finding must include `impact_scope` and `fix_scope`.
|
|
41
|
-
8. Every scored dimension MUST include dimension_notes with concrete evidence.
|
|
42
|
-
9. If a dimension score is >85.0, include `issues_preventing_higher_score` in dimension_notes.
|
|
43
|
-
10. Use exactly one decimal place for every assessment and abstraction sub-axis score.
|
|
44
|
-
11. Ignore prior chat context and any target-threshold assumptions.
|
|
45
|
-
12. Do not edit repository files.
|
|
46
|
-
13. Return ONLY valid JSON, no markdown fences.
|
|
47
|
-
|
|
48
|
-
Scope enums:
|
|
49
|
-
- impact_scope: "local" | "module" | "subsystem" | "codebase"
|
|
50
|
-
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
|
|
51
|
-
|
|
52
|
-
Output schema:
|
|
53
|
-
{
|
|
54
|
-
"batch": "Architecture & Coupling",
|
|
55
|
-
"batch_index": 1,
|
|
56
|
-
"assessments": {"<dimension>": <0-100 with one decimal place>},
|
|
57
|
-
"dimension_notes": {
|
|
58
|
-
"<dimension>": {
|
|
59
|
-
"evidence": ["specific code observations"],
|
|
60
|
-
"impact_scope": "local|module|subsystem|codebase",
|
|
61
|
-
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
|
|
62
|
-
"confidence": "high|medium|low",
|
|
63
|
-
"issues_preventing_higher_score": "required when score >85.0",
|
|
64
|
-
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"findings": [{
|
|
68
|
-
"dimension": "<dimension>",
|
|
69
|
-
"identifier": "short_id",
|
|
70
|
-
"summary": "one-line defect summary",
|
|
71
|
-
"related_files": ["relative/path.py"],
|
|
72
|
-
"evidence": ["specific code observation"],
|
|
73
|
-
"suggestion": "concrete fix recommendation",
|
|
74
|
-
"confidence": "high|medium|low",
|
|
75
|
-
"impact_scope": "local|module|subsystem|codebase",
|
|
76
|
-
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
|
|
77
|
-
"root_cause_cluster": "optional_cluster_name_when_supported_by_history"
|
|
78
|
-
}],
|
|
79
|
-
"retrospective": {
|
|
80
|
-
"root_causes": ["optional: concise root-cause hypotheses"],
|
|
81
|
-
"likely_symptoms": ["optional: identifiers that look symptom-level"],
|
|
82
|
-
"possible_false_positives": ["optional: prior concept keys likely mis-scoped"]
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
STDOUT:
|
|
88
|
-
{
|
|
89
|
-
"batch": "Architecture & Coupling",
|
|
90
|
-
"batch_index": 1,
|
|
91
|
-
"assessments": {
|
|
92
|
-
"cross_module_architecture": 82.0,
|
|
93
|
-
"high_level_elegance": 84.0
|
|
94
|
-
},
|
|
95
|
-
"dimension_notes": {
|
|
96
|
-
"cross_module_architecture": {
|
|
97
|
-
"evidence": [
|
|
98
|
-
"src/types.ts is a barrel that re-exports request/reply/rule types, and internal modules like src/rule-engine.ts and src/formats/request-helpers.ts import from \"./types.js\"/\"../types.js\" instead of their domain-specific type files.",
|
|
99
|
-
"The root types barrel becomes a dependency hub for unrelated modules, increasing blast radius for type changes across domains."
|
|
100
|
-
],
|
|
101
|
-
"impact_scope": "subsystem",
|
|
102
|
-
"fix_scope": "multi_file_refactor",
|
|
103
|
-
"confidence": "high"
|
|
104
|
-
},
|
|
105
|
-
"high_level_elegance": {
|
|
106
|
-
"evidence": [
|
|
107
|
-
"src/formats/types.ts (format contracts) imports RequestMeta from src/formats/request-helpers.ts, coupling a contract type to a helper/logic module.",
|
|
108
|
-
"src/formats/request-helpers.ts mixes RequestMeta with buildMockRequest and parsing helpers, blurring ownership of the format boundary types."
|
|
109
|
-
],
|
|
110
|
-
"impact_scope": "module",
|
|
111
|
-
"fix_scope": "multi_file_refactor",
|
|
112
|
-
"confidence": "high"
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
"findings": [
|
|
116
|
-
{
|
|
117
|
-
"dimension": "cross_module_architecture",
|
|
118
|
-
"identifier": "types_barrel_hub",
|
|
119
|
-
"summary": "Root types barrel creates a dependency hub and obscures domain boundaries.",
|
|
120
|
-
"related_files": [
|
|
121
|
-
"src/types.ts",
|
|
122
|
-
"src/rule-engine.ts",
|
|
123
|
-
"src/formats/request-helpers.ts"
|
|
124
|
-
],
|
|
125
|
-
"evidence": [
|
|
126
|
-
"src/types.ts only re-exports from ./types/request.js, ./types/reply.js, ./types/rule.js.",
|
|
127
|
-
"src/rule-engine.ts and src/formats/request-helpers.ts import shared types from \"./types.js\"/\"../types.js\" rather than domain-specific type files."
|
|
128
|
-
],
|
|
129
|
-
"suggestion": "Prefer direct imports from domain type files (e.g., src/types/request.ts) for internal modules, or split into domain-specific entry points and reserve src/types.ts for external/public API use.",
|
|
130
|
-
"confidence": "high",
|
|
131
|
-
"impact_scope": "subsystem",
|
|
132
|
-
"fix_scope": "multi_file_refactor",
|
|
133
|
-
"root_cause_cluster": "type_barrel_hub"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"dimension": "high_level_elegance",
|
|
137
|
-
"identifier": "request_meta_in_helper",
|
|
138
|
-
"summary": "Format contract depends on helper module, blurring ownership of request boundary types.",
|
|
139
|
-
"related_files": [
|
|
140
|
-
"src/formats/types.ts",
|
|
141
|
-
"src/formats/request-helpers.ts"
|
|
142
|
-
],
|
|
143
|
-
"evidence": [
|
|
144
|
-
"src/formats/types.ts imports RequestMeta from ./request-helpers.js.",
|
|
145
|
-
"src/formats/request-helpers.ts combines RequestMeta with buildMockRequest and isStreaming logic."
|
|
146
|
-
],
|
|
147
|
-
"suggestion": "Move RequestMeta into a dedicated types module (e.g., src/formats/request-types.ts) or into src/formats/types.ts, and have request-helpers import it instead of defining it.",
|
|
148
|
-
"confidence": "high",
|
|
149
|
-
"impact_scope": "module",
|
|
150
|
-
"fix_scope": "multi_file_refactor",
|
|
151
|
-
"root_cause_cluster": "types_helpers_boundary_blur"
|
|
152
|
-
}
|
|
153
|
-
],
|
|
154
|
-
"retrospective": {
|
|
155
|
-
"root_causes": [
|
|
156
|
-
"Centralized barrel exports used for internal imports create hidden coupling between domains.",
|
|
157
|
-
"Type definitions colocated with helper logic blur boundary ownership."
|
|
158
|
-
],
|
|
159
|
-
"likely_symptoms": [
|
|
160
|
-
"types_barrel_hub",
|
|
161
|
-
"request_meta_in_helper"
|
|
162
|
-
],
|
|
163
|
-
"possible_false_positives": []
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
STDERR:
|
|
169
|
-
OpenAI Codex v0.114.0 (research preview)
|
|
170
|
-
--------
|
|
171
|
-
workdir: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server
|
|
172
|
-
model: gpt-5.2-codex
|
|
173
|
-
provider: openai
|
|
174
|
-
approval: never
|
|
175
|
-
sandbox: workspace-write [workdir, /tmp, $TMPDIR, /Users/suyash.x.srijan/.codex/memories]
|
|
176
|
-
reasoning effort: low
|
|
177
|
-
reasoning summaries: none
|
|
178
|
-
session id: 019cf2db-2212-75d3-803e-237fb1d9c4e8
|
|
179
|
-
--------
|
|
180
|
-
user
|
|
181
|
-
You are a focused subagent reviewer for a single holistic investigation batch.
|
|
182
|
-
|
|
183
|
-
Repository root: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server
|
|
184
|
-
Blind packet: /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server/.desloppify/review_packet_blind.json
|
|
185
|
-
Batch index: 1
|
|
186
|
-
Batch name: Architecture & Coupling
|
|
187
|
-
Batch dimensions: cross_module_architecture, high_level_elegance
|
|
188
|
-
Batch rationale: god modules, import-time side effects
|
|
189
|
-
|
|
190
|
-
Files assigned:
|
|
191
|
-
- src/types.ts
|
|
192
|
-
- src/formats/types.ts
|
|
193
|
-
- src/formats/request-helpers.ts
|
|
194
|
-
- src/logger.ts
|
|
195
|
-
- src/rule-engine.ts
|
|
196
|
-
- src/history.ts
|
|
197
|
-
- test/history.test.ts
|
|
198
|
-
|
|
199
|
-
Task requirements:
|
|
200
|
-
1. Read the blind packet and follow `system_prompt` constraints exactly.
|
|
201
|
-
1a. If previously flagged issues are listed above, use them as context for your review.
|
|
202
|
-
Verify whether each still applies to the current code. Do not re-report fixed or
|
|
203
|
-
wontfix issues. Use them as starting points to look deeper — inspect adjacent code
|
|
204
|
-
and related modules for defects the prior review may have missed.
|
|
205
|
-
1c. Think structurally: when you spot multiple individual issues that share a common
|
|
206
|
-
root cause (missing abstraction, duplicated pattern, inconsistent convention),
|
|
207
|
-
explain the deeper structural issue in the finding, not just the surface symptom.
|
|
208
|
-
If the pattern is significant enough, report the structural issue as its own finding
|
|
209
|
-
with appropriate fix_scope ('multi_file_refactor' or 'architectural_change') and
|
|
210
|
-
use `root_cause_cluster` to connect related symptom findings together.
|
|
211
|
-
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
|
|
212
|
-
3. Return 0-10 high-quality findings for this batch (empty array allowed).
|
|
213
|
-
3a. Do not suppress real defects to keep scores high; report every material issue you can support with evidence.
|
|
214
|
-
3b. Do not default to 100. Reserve 100 for genuinely exemplary evidence in this batch.
|
|
215
|
-
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
|
|
216
|
-
4a. Any dimension scored below 85.0 MUST include explicit feedback: add at least one finding with the same `dimension` and a non-empty actionable `suggestion`.
|
|
217
|
-
5. Every finding must include `related_files` with at least 2 files when possible.
|
|
218
|
-
6. Every finding must include `dimension`, `identifier`, `summary`, `evidence`, `suggestion`, and `confidence`.
|
|
219
|
-
7. Every finding must include `impact_scope` and `fix_scope`.
|
|
220
|
-
8. Every scored dimension MUST include dimension_notes with concrete evidence.
|
|
221
|
-
9. If a dimension score is >85.0, include `issues_preventing_higher_score` in dimension_notes.
|
|
222
|
-
10. Use exactly one decimal place for every assessment and abstraction sub-axis score.
|
|
223
|
-
11. Ignore prior chat context and any target-threshold assumptions.
|
|
224
|
-
12. Do not edit repository files.
|
|
225
|
-
13. Return ONLY valid JSON, no markdown fences.
|
|
226
|
-
|
|
227
|
-
Scope enums:
|
|
228
|
-
- impact_scope: "local" | "module" | "subsystem" | "codebase"
|
|
229
|
-
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
|
|
230
|
-
|
|
231
|
-
Output schema:
|
|
232
|
-
{
|
|
233
|
-
"batch": "Architecture & Coupling",
|
|
234
|
-
"batch_index": 1,
|
|
235
|
-
"assessments": {"<dimension>": <0-100 with one decimal place>},
|
|
236
|
-
"dimension_notes": {
|
|
237
|
-
"<dimension>": {
|
|
238
|
-
"evidence": ["specific code observations"],
|
|
239
|
-
"impact_scope": "local|module|subsystem|codebase",
|
|
240
|
-
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
|
|
241
|
-
"confidence": "high|medium|low",
|
|
242
|
-
"issues_preventing_higher_score": "required when score >85.0",
|
|
243
|
-
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
"findings": [{
|
|
247
|
-
"dimension": "<dimension>",
|
|
248
|
-
"identifier": "short_id",
|
|
249
|
-
"summary": "one-line defect summary",
|
|
250
|
-
"related_files": ["relative/path.py"],
|
|
251
|
-
"evidence": ["specific code observation"],
|
|
252
|
-
"suggestion": "concrete fix recommendation",
|
|
253
|
-
"confidence": "high|medium|low",
|
|
254
|
-
"impact_scope": "local|module|subsystem|codebase",
|
|
255
|
-
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
|
|
256
|
-
"root_cause_cluster": "optional_cluster_name_when_supported_by_history"
|
|
257
|
-
}],
|
|
258
|
-
"retrospective": {
|
|
259
|
-
"root_causes": ["optional: concise root-cause hypotheses"],
|
|
260
|
-
"likely_symptoms": ["optional: identifiers that look symptom-level"],
|
|
261
|
-
"possible_false_positives": ["optional: prior concept keys likely mis-scoped"]
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
mcp startup: no servers
|
|
266
|
-
|
|
267
|
-
thinking
|
|
268
|
-
**Reading blind packet file**
|
|
269
|
-
|
|
270
|
-
I'm using `cat` to read the contents of the blind packet file for inspection.
|
|
271
|
-
exec
|
|
272
|
-
/bin/zsh -lc ls in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 188ms:
|
|
273
|
-
LICENCE
|
|
274
|
-
README.md
|
|
275
|
-
coverage
|
|
276
|
-
dist
|
|
277
|
-
docs
|
|
278
|
-
node_modules
|
|
279
|
-
package-lock.json
|
|
280
|
-
package.json
|
|
281
|
-
scorecard.png
|
|
282
|
-
src
|
|
283
|
-
test
|
|
284
|
-
tsconfig.json
|
|
285
|
-
tsconfig.test.json
|
|
286
|
-
vitest.config.ts
|
|
287
|
-
exec
|
|
288
|
-
/bin/zsh -lc 'cat .desloppify/review_packet_blind.json' in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
289
|
-
{
|
|
290
|
-
"command": "review",
|
|
291
|
-
"mode": "holistic",
|
|
292
|
-
"language": "typescript",
|
|
293
|
-
"dimensions": [
|
|
294
|
-
"cross_module_architecture",
|
|
295
|
-
"convention_outlier",
|
|
296
|
-
"error_consistency",
|
|
297
|
-
"abstraction_fitness",
|
|
298
|
-
"api_surface_coherence",
|
|
299
|
-
"authorization_consistency",
|
|
300
|
-
"ai_generated_debt",
|
|
301
|
-
"incomplete_migration",
|
|
302
|
-
"package_organization",
|
|
303
|
-
"high_level_elegance",
|
|
304
|
-
"mid_level_elegance",
|
|
305
|
-
"low_level_elegance",
|
|
306
|
-
"design_coherence"
|
|
307
|
-
],
|
|
308
|
-
"dimension_prompts": {
|
|
309
|
-
|
|
310
|
-
thinking
|
|
311
|
-
**Planning file reading with sed**
|
|
312
|
-
exec
|
|
313
|
-
/bin/zsh -lc "sed -n '1,240p' src/types.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
314
|
-
export type {
|
|
315
|
-
FormatName,
|
|
316
|
-
MockRequest,
|
|
317
|
-
Message,
|
|
318
|
-
ToolDef,
|
|
319
|
-
} from "./types/request.js";
|
|
320
|
-
export type {
|
|
321
|
-
Reply,
|
|
322
|
-
ReplyObject,
|
|
323
|
-
ErrorReply,
|
|
324
|
-
ToolCall,
|
|
325
|
-
Resolver,
|
|
326
|
-
ReplyOptions,
|
|
327
|
-
SequenceEntry,
|
|
328
|
-
} from "./types/reply.js";
|
|
329
|
-
export type {
|
|
330
|
-
Match,
|
|
331
|
-
MatchObject,
|
|
332
|
-
PendingRule,
|
|
333
|
-
RuleHandle,
|
|
334
|
-
exec
|
|
335
|
-
/bin/zsh -lc "sed -n '1,260p' src/formats/types.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
336
|
-
import type {
|
|
337
|
-
FormatName,
|
|
338
|
-
MockRequest,
|
|
339
|
-
ReplyObject,
|
|
340
|
-
ReplyOptions,
|
|
341
|
-
} from "../types.js";
|
|
342
|
-
import type { RequestMeta } from "./request-helpers.js";
|
|
343
|
-
|
|
344
|
-
export interface SSEChunk {
|
|
345
|
-
readonly event?: string | undefined;
|
|
346
|
-
readonly data: string;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export interface Format {
|
|
350
|
-
readonly name: FormatName;
|
|
351
|
-
readonly route: string;
|
|
352
|
-
parseRequest(body: unknown, meta?: RequestMeta): MockRequest;
|
|
353
|
-
isStreaming(body: unknown): boolean;
|
|
354
|
-
serialize(
|
|
355
|
-
reply: ReplyObject,
|
|
356
|
-
exec
|
|
357
|
-
/bin/zsh -lc "sed -n '1,260p' src/logger.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
358
|
-
import pc from "picocolors";
|
|
359
|
-
|
|
360
|
-
export const LEVEL_PRIORITY = {
|
|
361
|
-
none: 0,
|
|
362
|
-
error: 1,
|
|
363
|
-
warning: 2,
|
|
364
|
-
info: 3,
|
|
365
|
-
debug: 4,
|
|
366
|
-
all: 5,
|
|
367
|
-
} as const satisfies Record<string, number>;
|
|
368
|
-
|
|
369
|
-
/** Log verbosity, from `"none"` (silent) through to `"all"` (everything). */
|
|
370
|
-
export type LogLevel = keyof typeof LEVEL_PRIORITY;
|
|
371
|
-
|
|
372
|
-
const LEVEL_STYLE = {
|
|
373
|
-
error: { label: pc.red(pc.bold("ERROR")), symbol: pc.red("✗") },
|
|
374
|
-
warn: { label: pc.yellow(pc.bold("WARN")), symbol: pc.yellow("!") },
|
|
375
|
-
info: { label: pc.cyan("INFO"), symbol: pc.cyan("●") },
|
|
376
|
-
debug: { label: pc.dim("DEBUG"), symbol: pc.dim("·") },
|
|
377
|
-
} as const;
|
|
378
|
-
exec
|
|
379
|
-
/bin/zsh -lc "sed -n '1,260p' src/formats/request-helpers.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
380
|
-
import type { FormatName, Message, MockRequest, ToolDef } from "../types.js";
|
|
381
|
-
|
|
382
|
-
function asRecord(body: unknown): Record<string, unknown> {
|
|
383
|
-
if (typeof body === "object" && body !== null)
|
|
384
|
-
return body as Record<string, unknown>;
|
|
385
|
-
return {};
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export function isStreaming(body: unknown): boolean {
|
|
389
|
-
return asRecord(body)["stream"] !== false;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export interface RequestMeta {
|
|
393
|
-
readonly headers: Readonly<Record<string, string | undefined>>;
|
|
394
|
-
readonly path: string;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
const EMPTY_META: RequestMeta = { headers: {}, path: "" };
|
|
398
|
-
|
|
399
|
-
interface ParsedBody {
|
|
400
|
-
exec
|
|
401
|
-
/bin/zsh -lc "sed -n '1,260p' src/rule-engine.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
402
|
-
import type {
|
|
403
|
-
Match,
|
|
404
|
-
MatchObject,
|
|
405
|
-
MockRequest,
|
|
406
|
-
Resolver,
|
|
407
|
-
Reply,
|
|
408
|
-
ReplyOptions,
|
|
409
|
-
Rule,
|
|
410
|
-
RuleSummary,
|
|
411
|
-
} from "./types.js";
|
|
412
|
-
|
|
413
|
-
function safeRegex(re: RegExp): RegExp {
|
|
414
|
-
return re.global || re.sticky
|
|
415
|
-
? new RegExp(re.source, re.flags.replace(/[gy]/g, ""))
|
|
416
|
-
: re;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
function compilePattern(pattern: string | RegExp): (value: string) => boolean {
|
|
420
|
-
if (typeof pattern === "string") {
|
|
421
|
-
const lower = pattern.toLowerCase();
|
|
422
|
-
exec
|
|
423
|
-
/bin/zsh -lc "sed -n '1,260p' src/history.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
424
|
-
import type { MockRequest } from "./types.js";
|
|
425
|
-
|
|
426
|
-
/** A recorded request with the rule that matched and when it happened. */
|
|
427
|
-
export interface RecordedRequest {
|
|
428
|
-
readonly request: MockRequest;
|
|
429
|
-
/** The rule that matched, or `undefined` if the fallback was used. */
|
|
430
|
-
readonly rule: string | undefined;
|
|
431
|
-
readonly timestamp: number;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Records every request the server handles.
|
|
436
|
-
* Iterable and has fluent query methods for test assertions.
|
|
437
|
-
*
|
|
438
|
-
* @example
|
|
439
|
-
* ```ts
|
|
440
|
-
* expect(server.history.count()).toBe(3);
|
|
441
|
-
* expect(server.history.last()?.request.lastMessage).toBe("hello");
|
|
442
|
-
* const matched = server.history.where(r => r.rule !== undefined);
|
|
443
|
-
* ```
|
|
444
|
-
exec
|
|
445
|
-
/bin/zsh -lc "sed -n '1,260p' test/history.test.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
446
|
-
import { describe, it, expect, beforeEach } from "vitest";
|
|
447
|
-
import { RequestHistory, type RecordedRequest } from "../src/history.js";
|
|
448
|
-
import { makeReq } from "./helpers/make-req.js";
|
|
449
|
-
|
|
450
|
-
describe("RequestHistory", () => {
|
|
451
|
-
let history: RequestHistory;
|
|
452
|
-
|
|
453
|
-
beforeEach(() => {
|
|
454
|
-
history = new RequestHistory();
|
|
455
|
-
});
|
|
456
|
-
|
|
457
|
-
describe("record()", () => {
|
|
458
|
-
it("adds an entry", () => {
|
|
459
|
-
history.record(makeReq(), "rule-1");
|
|
460
|
-
expect(history.count()).toBe(1);
|
|
461
|
-
});
|
|
462
|
-
|
|
463
|
-
it("adds multiple entries in order", () => {
|
|
464
|
-
history.record(makeReq({ lastMessage: "first" }), "r1");
|
|
465
|
-
history.record(makeReq({ lastMessage: "second" }), "r2");
|
|
466
|
-
exec
|
|
467
|
-
/bin/zsh -lc "sed -n '260,520p' test/history.test.ts" in /Users/suyash.x.srijan/Documents/Personal_Projects/llm-mock-server succeeded in 0ms:
|
|
468
|
-
const messages: string[] = [];
|
|
469
|
-
for (const entry of history) {
|
|
470
|
-
messages.push(entry.request.lastMessage);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
expect(messages).toEqual(["a", "b", "c"]);
|
|
474
|
-
});
|
|
475
|
-
|
|
476
|
-
it("yields nothing for empty history", () => {
|
|
477
|
-
const messages: string[] = [];
|
|
478
|
-
for (const entry of history) {
|
|
479
|
-
messages.push(entry.request.lastMessage);
|
|
480
|
-
}
|
|
481
|
-
expect(messages).toEqual([]);
|
|
482
|
-
});
|
|
483
|
-
|
|
484
|
-
it("works with spread operator", () => {
|
|
485
|
-
history.record(makeReq({ lastMessage: "x" }), "r1");
|
|
486
|
-
history.record(makeReq({ lastMessage: "y" }), "r2");
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
thinking
|
|
491
|
-
**Identifying cross-module coupling via barrel types**
|
|
492
|
-
|
|
493
|
-
The central barrel types file is widely used, causing coupling across modules but might be intended. Notably, format types depend on a helper-defined RequestMeta type, reversing expected dependency flow and creating structural coupling between logic and type modules, which may impact high-level elegance.
|
|
494
|
-
thinking
|
|
495
|
-
**Crafting detailed findings and assessments JSON**
|
|
496
|
-
|
|
497
|
-
I'm creating structured findings for cross-module architecture and high-level elegance, highlighting the god-module barrel types causing coupling and the misplaced RequestMeta type causing ownership blurring, including impact scopes, fix scopes, evidence, and improvement suggestions for each dimension.
|
|
498
|
-
codex
|
|
499
|
-
{
|
|
500
|
-
"batch": "Architecture & Coupling",
|
|
501
|
-
"batch_index": 1,
|
|
502
|
-
"assessments": {
|
|
503
|
-
"cross_module_architecture": 82.0,
|
|
504
|
-
"high_level_elegance": 84.0
|
|
505
|
-
},
|
|
506
|
-
"dimension_notes": {
|
|
507
|
-
"cross_module_architecture": {
|
|
508
|
-
"evidence": [
|
|
509
|
-
"src/types.ts is a barrel that re-exports request/reply/rule types, and internal modules like src/rule-engine.ts and src/formats/request-helpers.ts import from \"./types.js\"/\"../types.js\" instead of their domain-specific type files.",
|
|
510
|
-
"The root types barrel becomes a dependency hub for unrelated modules, increasing blast radius for type changes across domains."
|
|
511
|
-
],
|
|
512
|
-
"impact_scope": "subsystem",
|
|
513
|
-
"fix_scope": "multi_file_refactor",
|
|
514
|
-
"confidence": "high"
|
|
515
|
-
},
|
|
516
|
-
"high_level_elegance": {
|
|
517
|
-
"evidence": [
|
|
518
|
-
"src/formats/types.ts (format contracts) imports RequestMeta from src/formats/request-helpers.ts, coupling a contract type to a helper/logic module.",
|
|
519
|
-
"src/formats/request-helpers.ts mixes RequestMeta with buildMockRequest and parsing helpers, blurring ownership of the format boundary types."
|
|
520
|
-
],
|
|
521
|
-
"impact_scope": "module",
|
|
522
|
-
"fix_scope": "multi_file_refactor",
|
|
523
|
-
"confidence": "high"
|
|
524
|
-
}
|
|
525
|
-
},
|
|
526
|
-
"findings": [
|
|
527
|
-
{
|
|
528
|
-
"dimension": "cross_module_architecture",
|
|
529
|
-
"identifier": "types_barrel_hub",
|
|
530
|
-
"summary": "Root types barrel creates a dependency hub and obscures domain boundaries.",
|
|
531
|
-
"related_files": [
|
|
532
|
-
"src/types.ts",
|
|
533
|
-
"src/rule-engine.ts",
|
|
534
|
-
"src/formats/request-helpers.ts"
|
|
535
|
-
],
|
|
536
|
-
"evidence": [
|
|
537
|
-
"src/types.ts only re-exports from ./types/request.js, ./types/reply.js, ./types/rule.js.",
|
|
538
|
-
"src/rule-engine.ts and src/formats/request-helpers.ts import shared types from \"./types.js\"/\"../types.js\" rather than domain-specific type files."
|
|
539
|
-
],
|
|
540
|
-
"suggestion": "Prefer direct imports from domain type files (e.g., src/types/request.ts) for internal modules, or split into domain-specific entry points and reserve src/types.ts for external/public API use.",
|
|
541
|
-
"confidence": "high",
|
|
542
|
-
"impact_scope": "subsystem",
|
|
543
|
-
"fix_scope": "multi_file_refactor",
|
|
544
|
-
"root_cause_cluster": "type_barrel_hub"
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
"dimension": "high_level_elegance",
|
|
548
|
-
"identifier": "request_meta_in_helper",
|
|
549
|
-
"summary": "Format contract depends on helper module, blurring ownership of request boundary types.",
|
|
550
|
-
"related_files": [
|
|
551
|
-
"src/formats/types.ts",
|
|
552
|
-
"src/formats/request-helpers.ts"
|
|
553
|
-
],
|
|
554
|
-
"evidence": [
|
|
555
|
-
"src/formats/types.ts imports RequestMeta from ./request-helpers.js.",
|
|
556
|
-
"src/formats/request-helpers.ts combines RequestMeta with buildMockRequest and isStreaming logic."
|
|
557
|
-
],
|
|
558
|
-
"suggestion": "Move RequestMeta into a dedicated types module (e.g., src/formats/request-types.ts) or into src/formats/types.ts, and have request-helpers import it instead of defining it.",
|
|
559
|
-
"confidence": "high",
|
|
560
|
-
"impact_scope": "module",
|
|
561
|
-
"fix_scope": "multi_file_refactor",
|
|
562
|
-
"root_cause_cluster": "types_helpers_boundary_blur"
|
|
563
|
-
}
|
|
564
|
-
],
|
|
565
|
-
"retrospective": {
|
|
566
|
-
"root_causes": [
|
|
567
|
-
"Centralized barrel exports used for internal imports create hidden coupling between domains.",
|
|
568
|
-
"Type definitions colocated with helper logic blur boundary ownership."
|
|
569
|
-
],
|
|
570
|
-
"likely_symptoms": [
|
|
571
|
-
"types_barrel_hub",
|
|
572
|
-
"request_meta_in_helper"
|
|
573
|
-
],
|
|
574
|
-
"possible_false_positives": []
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
tokens used
|
|
578
|
-
23,515
|
|
579
|
-
|