Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions .wolf/anatomy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# anatomy.md

> Auto-maintained by OpenWolf. Last scanned: 2026-05-10T16:00:01.166Z
> Files: 512 tracked | Anatomy hits: 0 | Misses: 0
> Auto-maintained by OpenWolf. Last scanned: 2026-05-10T18:25:58.680Z
> Files: 520 tracked | Anatomy hits: 0 | Misses: 0

## ./

Expand Down Expand Up @@ -826,3 +826,32 @@
- `py.typed` (~0 tok)
- `util.py` — you may not use this file except in compliance with the License. (~4962 tok)
- `version.py` (~7 tok)

## docs/superpowers/plans/

- `2026-05-10-modelconfig-deep-read.md` — ModelConfiguration Deep Read Implementation Plan (~8779 tok)

## docs/superpowers/specs/

- `2026-05-10-modelconfig-deep-read-design.md` — Deepen GET /modelconfigurations/{id} Response (DataSetSpec + VariablePresentation) (~2909 tok)

## model-catalog-api/src/

- `custom-handlers.ts` — Custom endpoint handlers for the 13 /custom/ and /user/login endpoints. (~8414 tok)
- `service.ts` — Generic CRUD service for all 46 API resource types. (~4901 tok)

## model-catalog-api/src/__tests__/

- `integration.test.ts` — Integration tests for the CatalogServiceImpl pipeline. (~7130 tok)

## model-catalog-api/src/__tests__/e2e/

- `read-shape-deep-e2e.test.ts` — Declares softwareId (~2967 tok)

## model-catalog-api/src/hasura/

- `field-maps.ts` — GraphQL field selection strings for each Hasura modelcatalog entity table. (~4979 tok)

## model-catalog-api/src/hasura/__tests__/

- `field-maps.test.ts` — Declares sel (~526 tok)
130 changes: 130 additions & 0 deletions .wolf/buglog.json
Original file line number Diff line number Diff line change
Expand Up @@ -1958,6 +1958,136 @@
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-05-10T14:57:39.523Z"
},
{
"id": "bug-117",
"timestamp": "2026-05-10T17:52:47.537Z",
"error_message": "Missing guard clause",
"file": "model-catalog-api/src/hasura/field-maps.ts",
"root_cause": "No early return/throw for edge case: mode === 'byId'",
"fix": "Added guard clause: if (mode === 'byId')",
"tags": [
"auto-detected",
"guard-clause",
"ts"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-05-10T17:52:47.537Z"
},
{
"id": "bug-118",
"timestamp": "2026-05-10T18:05:54.201Z",
"error_message": "Null/undefined access in ",
"file": "model-catalog-api/src/__tests__/e2e/read-shape-deep-e2e.test.ts",
"root_cause": "Property access on potentially null/undefined value",
"fix": "Added null safety (optional chaining or null check) | Also: it('list path GET /modelconfigurations does NOT include hasP; const softwareId = uniqueId('software');",
"tags": [
"auto-detected",
"null-safety",
"ts"
],
"related_bugs": [],
"occurrences": 2,
"last_seen": "2026-05-10T18:06:45.368Z"
},
{
"id": "bug-119",
"timestamp": "2026-05-10T18:07:04.651Z",
"error_message": "Missing await",
"file": "model-catalog-api/src/__tests__/e2e/read-shape-deep-e2e.test.ts",
"root_cause": "Async call without await — returned Promise instead of value",
"fix": "Added await to async call",
"tags": [
"auto-detected",
"async-fix",
"ts"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-05-10T18:07:04.651Z"
},
{
"id": "bug-120",
"timestamp": "2026-05-10T18:23:27.905Z",
"error_message": "Significant refactor of ",
"file": "model-catalog-api/src/service.ts",
"root_cause": "8 lines replaced/restructured",
"fix": "Rewrote 10→3 lines (8 removed) | Also: if (!id.startsWith('https://') && !id.startsWith('; reply.code(400).send({",
"tags": [
"auto-detected",
"refactor",
"ts"
],
"related_bugs": [],
"occurrences": 2,
"last_seen": "2026-05-10T18:23:34.728Z"
},
{
"id": "bug-121",
"timestamp": "2026-05-10T18:23:41.277Z",
"error_message": "Incorrect value in code",
"file": "model-catalog-api/src/service.ts",
"root_cause": "Had 'https://'",
"fix": "Changed to `${resourceConfig.idPrefix}${id}`",
"tags": [
"auto-detected",
"wrong-value",
"ts"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-05-10T18:23:41.277Z"
},
{
"id": "bug-122",
"timestamp": "2026-05-10T18:25:13.931Z",
"error_message": "Significant refactor of ",
"file": "model-catalog-api/src/custom-handlers.ts",
"root_cause": "2 lines replaced/restructured",
"fix": "Rewrote 4→5 lines (2 removed)",
"tags": [
"auto-detected",
"refactor",
"ts"
],
"related_bugs": [],
"occurrences": 1,
"last_seen": "2026-05-10T18:25:13.931Z"
},
{
"id": "bug-123",
"timestamp": "2026-05-10T18:25:43.589Z",
"error_message": "Significant refactor of ",
"file": "model-catalog-api/src/__tests__/integration.test.ts",
"root_cause": "7 lines replaced/restructured",
"fix": "Rewrote 17→29 lines (7 removed) | Also: it('custom_configurationsetups_id_get returns 400 ; const req = makeReq({ params: { id: 'hand_v6' } }) | Also: it('custom_datasetspecifications_get returns 400 f; const req = makeReq({ query: { configurationid: 's",
"tags": [
"auto-detected",
"refactor",
"ts"
],
"related_bugs": [],
"occurrences": 3,
"last_seen": "2026-05-10T18:25:58.690Z"
},
{
"id": "bug-124",
"timestamp": "2026-05-10T18:26:09Z",
"error_message": "Resource ID must be a full URL-encoded URI",
"file": "model-catalog-api/src/service.ts, model-catalog-api/src/custom-handlers.ts",
"root_cause": "getById/delete and custom-handler {id} validation rejected bare slug paths (e.g. /softwares/<uuid>), forcing callers to URL-encode the full https://w3id.org/okn/i/mint/<id>.",
"fix": "Replaced strict isFullUri rejection with prepend-on-bare-slug. service.ts getById/deleteResource now compute fullId = isFullUri(id) ? id : `${resourceConfig.idPrefix}${id}`. custom-handlers.ts: requireFullUri (reject) replaced with resolveResourceId (prepend prefix). Update path uses isFullUri so http:// also accepted. Flipped 3 unit tests that asserted 400 to assert prepended URI is sent to Hasura.",
"tags": [
"model-catalog-api",
"validation",
"id-prefix",
"fastify",
"ergonomics"
],
"related_bugs": ["bug-086"],
"occurrences": 1,
"last_seen": "2026-05-10T18:26:09Z"
}
]
}
2 changes: 1 addition & 1 deletion .wolf/cron-state.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"last_heartbeat": "2026-05-10T16:29:39.549Z",
"last_heartbeat": "2026-05-10T18:34:21.193Z",
"engine_status": "running",
"execution_log": [
{
Expand Down
116 changes: 107 additions & 9 deletions .wolf/hooks/_session.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,110 @@
{
"session_id": "session-2026-05-10-1246",
"started": "2026-05-10T16:46:26.074Z",
"files_read": {},
"files_written": [],
"edit_counts": {},
"anatomy_hits": 0,
"anatomy_misses": 0,
"repeated_reads_warned": 0,
"session_id": "session-2026-05-10-1421",
"started": "2026-05-10T18:21:02.676Z",
"files_read": {
"/Users/mosorio/repos/mint/model-catalog-api/src/service.ts": {
"count": 4,
"tokens": 5053,
"first_read": "2026-05-10T18:21:55.298Z"
},
"/Users/mosorio/repos/mint/model-catalog-api/src/custom-handlers.ts": {
"count": 1,
"tokens": 0,
"first_read": "2026-05-10T18:21:56.230Z"
},
"/Users/mosorio/repos/mint/model-catalog-api/src/__tests__/integration.test.ts": {
"count": 3,
"tokens": 0,
"first_read": "2026-05-10T18:22:04.939Z"
},
"/Users/mosorio/repos/mint/model-catalog-api/src/mappers/resource-registry.ts": {
"count": 1,
"tokens": 0,
"first_read": "2026-05-10T18:22:14.495Z"
}
},
"files_written": [
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/service.ts",
"action": "edit",
"tokens": 56,
"at": "2026-05-10T18:23:27.904Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/service.ts",
"action": "edit",
"tokens": 79,
"at": "2026-05-10T18:23:34.726Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/service.ts",
"action": "edit",
"tokens": 50,
"at": "2026-05-10T18:23:41.276Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/custom-handlers.ts",
"action": "edit",
"tokens": 121,
"at": "2026-05-10T18:24:30.828Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/custom-handlers.ts",
"action": "edit",
"tokens": 70,
"at": "2026-05-10T18:25:02.101Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/custom-handlers.ts",
"action": "edit",
"tokens": 73,
"at": "2026-05-10T18:25:06.125Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/custom-handlers.ts",
"action": "edit",
"tokens": 70,
"at": "2026-05-10T18:25:10.227Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/custom-handlers.ts",
"action": "edit",
"tokens": 59,
"at": "2026-05-10T18:25:13.929Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/custom-handlers.ts",
"action": "edit",
"tokens": 87,
"at": "2026-05-10T18:25:18.620Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/__tests__/integration.test.ts",
"action": "edit",
"tokens": 318,
"at": "2026-05-10T18:25:43.588Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/__tests__/integration.test.ts",
"action": "edit",
"tokens": 185,
"at": "2026-05-10T18:25:51.935Z"
},
{
"file": "/Users/mosorio/repos/mint/model-catalog-api/src/__tests__/integration.test.ts",
"action": "edit",
"tokens": 203,
"at": "2026-05-10T18:25:58.689Z"
}
],
"edit_counts": {
"model-catalog-api/src/service.ts": 3,
"model-catalog-api/src/custom-handlers.ts": 6,
"model-catalog-api/src/__tests__/integration.test.ts": 3
},
"anatomy_hits": 1,
"anatomy_misses": 3,
"repeated_reads_warned": 5,
"cerebrum_warnings": 0,
"stop_count": 3
"stop_count": 2
}
42 changes: 42 additions & 0 deletions .wolf/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,3 +802,45 @@

| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|
| 13:15 | Created docs/superpowers/specs/2026-05-10-modelconfig-deep-read-design.md | — | ~3103 |
| 13:15 | Session end: 1 writes across 1 files (2026-05-10-modelconfig-deep-read-design.md) | 4 reads | ~3325 tok |
| 13:36 | Created docs/superpowers/plans/2026-05-10-modelconfig-deep-read.md | — | ~9364 |
| 13:36 | Session end: 2 writes across 2 files (2026-05-10-modelconfig-deep-read-design.md, 2026-05-10-modelconfig-deep-read.md) | 7 reads | ~13358 tok |
| 13:52 | Created model-catalog-api/src/hasura/__tests__/field-maps.test.ts | — | ~526 |
| 13:52 | Edited model-catalog-api/src/hasura/field-maps.ts | added 2 condition(s) | ~441 |
| 13:56 | Edited model-catalog-api/src/hasura/__tests__/field-maps.test.ts | 1→2 lines | ~53 |
| 13:59 | Edited model-catalog-api/src/hasura/field-maps.ts | expanded (+143 lines) | ~667 |
| 14:00 | Edited model-catalog-api/src/hasura/field-maps.ts | modified relationships() | ~208 |
| 14:00 | Edited model-catalog-api/src/hasura/__tests__/field-maps.test.ts | 2→1 lines | ~25 |
| 14:01 | Edited model-catalog-api/src/service.ts | 4→4 lines | ~51 |
| 14:05 | Created model-catalog-api/src/__tests__/e2e/read-shape-deep-e2e.test.ts | — | ~1530 |
| 14:05 | Edited model-catalog-api/src/__tests__/e2e/read-shape-deep-e2e.test.ts | added optional chaining | ~631 |
| 14:06 | Edited model-catalog-api/src/__tests__/e2e/read-shape-deep-e2e.test.ts | added optional chaining | ~601 |
| 14:07 | Edited model-catalog-api/src/__tests__/e2e/read-shape-deep-e2e.test.ts | expanded (+27 lines) | ~390 |
| 14:07 | Session end: 13 writes across 6 files (2026-05-10-modelconfig-deep-read-design.md, 2026-05-10-modelconfig-deep-read.md, field-maps.test.ts, field-maps.ts, service.ts) | 12 reads | ~23288 tok |
| 14:08 | Session end: 13 writes across 6 files (2026-05-10-modelconfig-deep-read-design.md, 2026-05-10-modelconfig-deep-read.md, field-maps.test.ts, field-maps.ts, service.ts) | 12 reads | ~23288 tok |

## Session: 2026-05-10 14:09

| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|

## Session: 2026-05-10 14:21

| Time | Action | File(s) | Outcome | ~Tokens |
|------|--------|---------|---------|--------|
| 14:23 | Edited model-catalog-api/src/service.ts | reduced (-7 lines) | ~56 |
| 14:23 | Edited model-catalog-api/src/service.ts | modified DeleteMutation() | ~79 |
| 14:23 | Edited model-catalog-api/src/service.ts | startsWith() → isFullUri() | ~50 |
| 14:24 | Edited model-catalog-api/src/custom-handlers.ts | modified resolveResourceId() | ~121 |
| 14:25 | Edited model-catalog-api/src/custom-handlers.ts | requireFullUri() → resolveResourceId() | ~70 |
| 14:25 | Edited model-catalog-api/src/custom-handlers.ts | requireFullUri() → resolveResourceId() | ~73 |
| 14:25 | Edited model-catalog-api/src/custom-handlers.ts | requireFullUri() → resolveResourceId() | ~70 |
| 14:25 | Edited model-catalog-api/src/custom-handlers.ts | modified if() | ~59 |
| 14:25 | Edited model-catalog-api/src/custom-handlers.ts | requireFullUri() → resolveResourceId() | ~87 |
| 14:25 | Edited model-catalog-api/src/__tests__/integration.test.ts | expanded (+12 lines) | ~318 |
| 14:25 | Edited model-catalog-api/src/__tests__/integration.test.ts | expanded (+9 lines) | ~185 |
| 14:25 | Edited model-catalog-api/src/__tests__/integration.test.ts | expanded (+10 lines) | ~203 |
| 14:26 | accept bare-slug {id} on get/delete + custom handlers (prepend idPrefix) | model-catalog-api/src/{service,custom-handlers}.ts, integration.test.ts | 120 unit tests pass | ~3500 |
| 14:26 | Session end: 12 writes across 3 files (service.ts, custom-handlers.ts, integration.test.ts) | 4 reads | ~6424 tok |
| 14:27 | Session end: 12 writes across 3 files (service.ts, custom-handlers.ts, integration.test.ts) | 4 reads | ~6424 tok |
Loading