Skip to content

refactor(heartbeat): flip wire substrate value nemoclaw → ainfera_core#15

Merged
hizrianraz merged 1 commit into
mainfrom
sprint-v1.7-substrate-rename
May 18, 2026
Merged

refactor(heartbeat): flip wire substrate value nemoclaw → ainfera_core#15
hizrianraz merged 1 commit into
mainfrom
sprint-v1.7-substrate-rename

Conversation

@hizrianraz
Copy link
Copy Markdown
Contributor

@hizrianraz hizrianraz commented May 17, 2026

Summary

Companion PR to ainfera-ai/ainfera-os sprint-v1.7-prep-founder-wip (Phase 2 substrate rename per [LOCK 11.1] · Decision A1a, forward-only flip).

Once ainfera-os deploys, the heartbeat shim will start sending "substrate": "ainfera_core" instead of "nemoclaw". This PR flips the api side to match:

  • GET /v1/heartbeat/latest?substrate=... default"ainfera_core" (was "nemoclaw"). Without this, the no-arg endpoint returns 404 once ainfera-os deploys.
  • Docstrings + OpenAPI summaries updated to reference ainfera_core.
  • Test fixtures (test_heartbeat, test_install_and_dashboard, test_signup_extended) flipped to "ainfera_core" / "ainfera_core+openclaw".
  • Migration 20260515_0004 docstring updated.

Decision A1a (forward-only, no DB backfill)

  • HeartbeatORM.substrate column type / index unchanged (no schema migration).
  • Historical heartbeats.substrate='nemoclaw' rows preserved as point-in-time audit truth — that's what the substrate WAS named at that time; backfilling rewrites history.
  • Avoids triggering [LOCK 6.4] Supabase DML gate (no UPDATE on heartbeats table).
  • Queries spanning the rename boundary need to OR both values.

Preserved (out of scope)

  • manwe-substrate literal in test_heartbeat.py:117 — Manwe's hermes-side substrate, was never ours.
  • .claude/CLAUDE.md:18 NemoClaw + OpenClaw — NVIDIA stack per [LOCK 2.2] Varda framework.

Test plan

  • All 6 .py files AST-parse clean
  • Pre-commit gates (ruff, ruff format, mypy --strict, pytest -x) — all PASSED
  • grep -rIn "nemoclaw\|NemoClaw" --exclude-dir=.claude . → 0 matches in api/
  • CI: full pytest pass on PR (heartbeat + install_and_dashboard + signup_extended integration tests)
  • Post-merge smoke: curl https://api.ainfera.ai/v1/heartbeat/latest (no arg) returns 200 once ainfera-os companion deploys, with substrate=ainfera_core

Cross-repo coupling

Pair with ainfera-ai/ainfera-os PR (Phase 2 rename). Either order works in steady state since substrate is opaque String(64); brief transitional 404 window for no-arg /v1/heartbeat/latest until both deploys land.

Not bundled

tests/integration/test_aamc_invariants.py has founder-in-flight changes locally and is intentionally NOT included in this PR (Memory #14 · no bundling with in-flight files).

🤖 Generated with Claude Code


Note

Low Risk
Low risk string/default flips, but it can change behavior of no-arg GET /v1/heartbeat/latest for deployments still sending/expecting substrate=nemoclaw. No schema or auth logic changes.

Overview
Updates the heartbeat API to treat ainfera_core as the primary substrate name: OpenAPI/docs now reference ainfera_core, and GET /v1/heartbeat/latest defaults to substrate=ainfera_core instead of nemoclaw.

Integration tests and fixtures are updated to post/assert substrate=ainfera_core (and framework=ainfera_core+openclaw where relevant), and the related Alembic revision docstring is adjusted accordingly.

Reviewed by Cursor Bugbot for commit 93543ea. Bugbot is set up for automated code reviews on this repo. Configure here.

Companion PR to ainfera-os refactor(substrate): rename nemoclaw → ainfera_core (Phase 2).

[LOCK 11.1] Decision A1a (forward-only flip, no DB backfill).

ainfera-os will start sending `"substrate": "ainfera_core"` on the
heartbeat POST. This PR flips the api side to match:

- `GET /v1/heartbeat/latest?substrate=...` default → "ainfera_core"
  (was "nemoclaw"). Without this flip, the no-arg endpoint returns 404
  once ainfera-os deploys.
- Docstrings + OpenAPI summaries updated to reference ainfera_core.
- Test fixtures (test_heartbeat, test_install_and_dashboard,
  test_signup_extended) flipped to "ainfera_core" / "ainfera_core+openclaw".
- Migration 20260515_0004 docstring updated.

Not touched:
- HeartbeatORM.substrate column type / index — opaque String(64), value
  unchanged (no migration).
- Historical `heartbeats.substrate='nemoclaw'` rows preserved as
  point-in-time audit truth (avoids [LOCK 6.4] Supabase DML gate;
  queries spanning the rename boundary need to OR both values).
- `manwe-substrate` literal in test_heartbeat:117 — Manwe's hermes-side
  substrate, never was ours.
- .claude/CLAUDE.md:18 `NemoClaw + OpenClaw` — NVIDIA stack per LOCK 2.2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hizrianraz hizrianraz force-pushed the sprint-v1.7-substrate-rename branch from 93543ea to e68421c Compare May 18, 2026 15:06
@cursor
Copy link
Copy Markdown

cursor Bot commented May 18, 2026

You have used all Bugbot PR reviews included in your free trial for your GitHub account on this workspace.

To continue using Bugbot reviews, enable Bugbot for your team in the Cursor dashboard.

@hizrianraz hizrianraz merged commit 94f76d2 into main May 18, 2026
3 checks passed
@hizrianraz hizrianraz deleted the sprint-v1.7-substrate-rename branch May 18, 2026 15:07
hizrianraz added a commit that referenced this pull request May 18, 2026
…43)

Eliminates the silent-failure billing burn pattern from
INC-2026-05-18-004 Bug 5.

Stop-gap:
- Adds `stream: bool = False` to InferenceRequest (was silently dropped)
- Returns 501 with code=streaming_not_supported when stream=true
- Eliminates the silent retry pattern: clients fail fast

Per v6.2 Discipline #15 + When-stuck #21. Full SSE = AIN-174 Phase B.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant