personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

test: restore make review API baseline verification

Root cause: the `indexer/journal.sqlite` fixture is gitignored (per
.gitignore *.sqlite pattern), so on a clean checkout the sandbox had an
empty indexer — graph/search/entities endpoints returned no data.
Nothing in the sandbox boot ran the indexer against the fixture journal,
and the harness drift accumulated invisibly while `make review` was red
for pinchtab reasons.

Fix:
- Makefile: `make verify-api` and `make review` now run
`sol indexer --rescan-full` against the sandbox journal before
calling the verify harness, guaranteeing populated entities/signals
regardless of local-pollution state.
- Makefile: `make update-api-baselines SANDBOX=1` regenerates
sandbox-only baselines (graph, search, badge-count, updated-days)
from the live sandbox with the indexer populated — the Flask
test-client path skips them.
- verify_api.py: `sol/badge-count` marked `sandbox_only: True`. It
reads `date.today()` live and the sandbox boot produces a failed
`sol call identity digest` talent run, so count=1 in sandbox mode
vs count=0 in frozen Flask test-client mode. The Flask test
baseline skips it; the sandbox baseline captures the boot-time
reality.
- Baselines regenerated for the two endpoints that drifted against
real current fixture state:
- `graph/graph`: Romeo + Juliet `observation_depth` 2→4,
`score` +4 each (reflects real entity observation counts).
- `sol/badge-count`: 0→1 (captures boot-time digest failure).

`make review`: Review: ALL PASS (API 51/51 + Browser 19/19).
`pytest tests/test_api_baselines.py`: 46 passed, 5 skipped
(sandbox-only endpoints correctly excluded from test-client path).

+26 -8
+20 -3
Makefile
··· 189 189 @SANDBOX_JOURNAL=$$(cat .sandbox.journal); \ 190 190 CONVEY_PORT=$$(cat "$$SANDBOX_JOURNAL/health/convey.port"); \ 191 191 RESULT=0; \ 192 + _SOLSTONE_JOURNAL_OVERRIDE="$$SANDBOX_JOURNAL" $(VENV_BIN)/sol indexer --rescan-full > /dev/null; \ 192 193 _SOLSTONE_JOURNAL_OVERRIDE="$$SANDBOX_JOURNAL" $(VENV_BIN)/python tests/verify_api.py verify --base-url "http://localhost:$$CONVEY_PORT" || RESULT=$$?; \ 193 194 $(MAKE) sandbox-stop; \ 194 195 exit $$RESULT 195 196 196 - # Regenerate all API baseline files from the deterministic Flask test-client path 197 + # Regenerate API baseline files. By default uses the deterministic Flask 198 + # test-client path (frozen time). For sandbox-only endpoints (graph, search, 199 + # badge-count, updated-days), pass SANDBOX=1 to regenerate from the live 200 + # sandbox — these rely on the indexer and real clock. 197 201 update-api-baselines: .installed 198 - @echo "Updating API baselines (test client)..." 199 - @$(VENV_BIN)/python tests/verify_api.py update 202 + @if [ "$(SANDBOX)" = "1" ]; then \ 203 + echo "Updating API baselines (sandbox, includes sandbox-only endpoints)..."; \ 204 + $(MAKE) sandbox; \ 205 + SANDBOX_JOURNAL=$$(cat .sandbox.journal); \ 206 + CONVEY_PORT=$$(cat "$$SANDBOX_JOURNAL/health/convey.port"); \ 207 + RESULT=0; \ 208 + _SOLSTONE_JOURNAL_OVERRIDE="$$SANDBOX_JOURNAL" $(VENV_BIN)/sol indexer --rescan-full > /dev/null; \ 209 + _SOLSTONE_JOURNAL_OVERRIDE="$$SANDBOX_JOURNAL" $(VENV_BIN)/python tests/verify_api.py update --base-url "http://localhost:$$CONVEY_PORT" || RESULT=$$?; \ 210 + $(MAKE) sandbox-stop; \ 211 + exit $$RESULT; \ 212 + else \ 213 + echo "Updating API baselines (test client)..."; \ 214 + $(VENV_BIN)/python tests/verify_api.py update; \ 215 + fi 200 216 201 217 202 218 # Install pinchtab browser automation tool ··· 244 260 BASE_URL="http://localhost:$$CONVEY_PORT"; \ 245 261 RESULT_API=0; \ 246 262 RESULT_BROWSER=0; \ 263 + _SOLSTONE_JOURNAL_OVERRIDE="$$SANDBOX_JOURNAL" $(VENV_BIN)/sol indexer --rescan-full > /dev/null; \ 247 264 echo ""; \ 248 265 echo "=== API baseline verification ==="; \ 249 266 _SOLSTONE_JOURNAL_OVERRIDE="$$SANDBOX_JOURNAL" $(VENV_BIN)/python tests/verify_api.py verify --base-url "$$BASE_URL" || RESULT_API=$$?; \
+4 -4
tests/baselines/api/graph/graph.json
··· 476 476 "is_principal": false, 477 477 "kg_edge_count": 4, 478 478 "name": "Juliet Capulet", 479 - "observation_depth": 2, 479 + "observation_depth": 4, 480 480 "recency": 0.4, 481 - "score": 92.2, 481 + "score": 96.2, 482 482 "type": "person" 483 483 }, 484 484 { ··· 502 502 "is_principal": true, 503 503 "kg_edge_count": 9, 504 504 "name": "Romeo Montague", 505 - "observation_depth": 2, 505 + "observation_depth": 4, 506 506 "recency": 0.4, 507 - "score": 53.2, 507 + "score": 57.2, 508 508 "type": "person" 509 509 }, 510 510 {
+1 -1
tests/baselines/api/sol/badge-count.json
··· 1 1 { 2 - "count": 0 2 + "count": 1 3 3 }
+1
tests/verify_api.py
··· 78 78 "path": "/app/sol/api/badge-count", 79 79 "params": {}, 80 80 "status": 200, 81 + "sandbox_only": True, # reads date.today() live + sandbox produces boot-time talent runs 81 82 }, 82 83 { 83 84 "app": "sol",