Skip to content

Commit e93ad52

Browse files
nizzlenitzclaude
andcommitted
ci(replatform): load the app as a component (fix ingest 404 → parity never passed)
The Replatform Parity workflow has never succeeded — every run fails at "Ingest corpus" with `Ingest begin failed: 404 Not found`, so nothing past unit tests (integration, e2e, parity, search-eval, chat-grounding) has ever actually run. Root cause: the workflow started Harper with `harper start`, which boots a bare installed instance with none of the app's custom resources. The ingest client POSTs to /Ingest (an exported Resource), which only exists when app/ is loaded as a COMPONENT. Confirmed locally: /Ingest returns 401/500 under `harper dev/run .` but 404 under `harper start`. Fix: run the app as a component — `harper run .` from app/, backgrounded (env, including the API keys, is inherited). Also wait on / then fail fast with the app log if /Ingest still 404s, so a component-load regression is obvious instead of silently cascading into the ingest step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Eijma5uKcPZi9tqV2aJBeh
1 parent ced5a44 commit e93ad52

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/replatform-parity.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,24 @@ jobs:
7474
harper install --TC_AGREEMENT=yes --HDB_ADMIN_USERNAME="$HDB_ADMIN_USERNAME" \
7575
--HDB_ADMIN_PASSWORD="$HDB_ADMIN_PASSWORD" --ROOTPATH="$ROOTPATH" \
7676
--HTTP_PORT=9936 --OPERATIONSAPI_NETWORK_PORT=9935
77-
(cd app && ROOTPATH="$ROOTPATH" harper start)
78-
for i in $(seq 1 30); do
77+
# Run the app as a COMPONENT — `harper run .` loads app/ (its custom
78+
# resources: /Ingest, /api/*, /admin/*), whereas `harper start` boots a
79+
# bare instance with none of them (so ingest 404'd). Backgrounded so the
80+
# later steps run against it; env (incl. the API keys) is inherited.
81+
(cd app && ROOTPATH="$ROOTPATH" nohup harper run . > "$ROOTPATH/harper-run.log" 2>&1 &)
82+
for i in $(seq 1 45); do
7983
curl -sf -o /dev/null "http://127.0.0.1:9936/" && break || sleep 2
8084
done
85+
curl -s -o /dev/null -w "Harper up: HTTP %{http_code} on /\n" "http://127.0.0.1:9936/" || true
86+
# Fail fast (with the app log) if the component didn't register its routes:
87+
# a 404 on /Ingest means the app didn't load; any other code means it did.
88+
ingest_code=$(curl -s -o /dev/null -w '%{http_code}' "http://127.0.0.1:9936/Ingest")
89+
echo "/Ingest probe: HTTP $ingest_code"
90+
if [ "$ingest_code" = "404" ]; then
91+
echo "::error::/Ingest 404 — app component did not load its routes"
92+
tail -80 "$ROOTPATH/harper-run.log" || true
93+
exit 1
94+
fi
8195
8296
- name: Ingest corpus
8397
env:

0 commit comments

Comments
 (0)