diff --git a/.github/workflows/sync-screenpipe-fork.yml b/.github/workflows/sync-screenpipe-fork.yml index ad7f95bc..977b3a94 100644 --- a/.github/workflows/sync-screenpipe-fork.yml +++ b/.github/workflows/sync-screenpipe-fork.yml @@ -1,9 +1,8 @@ name: Sync screenpipe fork -# Keeps AnkushMalaker/screenpipe's `chronicle` branch rebased directly onto -# upstream screenpipe/screenpipe main. The branch carries Chronicle's complete -# patch stack; the former `custom/linux-timeline-stability` base branch was -# folded into it and deleted in August 2026. +# Keeps AnkushMalaker/screenpipe's `chronicle-recorder` branch rebased directly +# onto upstream screenpipe/screenpipe main. The historical `chronicle` branch +# is left intact. # # This lives in chronicle rather than in the fork itself for two reasons: # `schedule` only fires from a repo's default branch, so hosting it in the fork @@ -38,14 +37,14 @@ env: jobs: rebase: - name: Rebase chronicle onto upstream/main + name: Rebase chronicle-recorder onto upstream/main runs-on: ubuntu-latest steps: - name: Check out the fork's Chronicle branch uses: actions/checkout@v4 with: repository: ${{ env.FORK }} - ref: chronicle + ref: chronicle-recorder # Full history: a rebase needs the merge base with its target, which a # shallow clone does not have. fetch-depth: 0 @@ -92,7 +91,7 @@ jobs: (github.event_name == 'schedule' || (inputs.push && inputs.push != 'false')) env: - BRANCH: chronicle + BRANCH: chronicle-recorder run: | # --force-with-lease, never plain --force: the rebase rewrote history, # but this still refuses if the branch moved since checkout (e.g. a @@ -104,7 +103,7 @@ jobs: env: GH_TOKEN: ${{ github.token }} BEHIND: ${{ steps.diverge.outputs.behind }} - BRANCH: chronicle + BRANCH: chronicle-recorder ONTO: upstream/main run: | title="screenpipe fork: $BRANCH needs manual conflict resolution" @@ -117,9 +116,14 @@ jobs: "The fork was left untouched. Resolve it locally:" \ "" \ '```' \ - "cd untracked/screenpipe && SYNC_BRANCH=$BRANCH ./sync-fork.sh" \ + "git clone --branch $BRANCH https://github.com/$FORK.git screenpipe-sync" \ + "cd screenpipe-sync" \ + 'expected=$(git rev-parse HEAD)' \ + "git fetch --no-tags $UPSTREAM main" \ + 'git rebase FETCH_HEAD' \ "# fix conflicts, then: git add && git rebase --continue" \ - "SYNC_BRANCH=$BRANCH ./sync-fork.sh --push" \ + "# Run the affected tests and review the diff before publishing." \ + "git push --force-with-lease=refs/heads/$BRANCH:\$expected origin HEAD:refs/heads/$BRANCH" \ '```' \ "" \ "Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID") diff --git a/backend/tests/test_codex_executor.py b/backend/tests/test_codex_executor.py index 62562b57..2d046341 100644 --- a/backend/tests/test_codex_executor.py +++ b/backend/tests/test_codex_executor.py @@ -228,7 +228,7 @@ def capture_run(cmd, **kwargs): await CodexMemoryAgent(root).run( "I am showing the notebook now.", "conv1", - images=[("rainbow.jpg", b"selected-frame")], + images=[("selected-frame.jpg", b"selected-frame")], ) assert captured["image"] == b"selected-frame" diff --git a/backend/tests/test_device_audio_ingest.py b/backend/tests/test_device_audio_ingest.py index 6afbd6f6..bd90e2a0 100644 --- a/backend/tests/test_device_audio_ingest.py +++ b/backend/tests/test_device_audio_ingest.py @@ -38,17 +38,17 @@ def item( def test_audio_stream_key_separates_microphone_from_system_output(): microphone = SimpleNamespace( user_id="user", - source_id="rainbow", + source_id="capture-node", locator=EvidenceLocator( - capture_source_id="rainbow", modality="audio", track_id="desk-mic" + capture_source_id="capture-node", modality="audio", track_id="desk-mic" ), metadata={"direction": "input"}, ) system = SimpleNamespace( user_id="user", - source_id="rainbow", + source_id="capture-node", locator=EvidenceLocator( - capture_source_id="rainbow", modality="audio", track_id="speakers" + capture_source_id="capture-node", modality="audio", track_id="speakers" ), metadata={"direction": "output"}, ) @@ -60,9 +60,9 @@ def test_audio_stream_key_separates_same_direction_provider_tracks(): def microphone(track_id: str): return SimpleNamespace( user_id="user", - source_id="rainbow", + source_id="capture-node", locator=EvidenceLocator( - capture_source_id="rainbow", modality="audio", track_id=track_id + capture_source_id="capture-node", modality="audio", track_id=track_id ), metadata={"direction": "input"}, ) @@ -76,32 +76,32 @@ def test_capture_source_identity_retains_same_direction_provider_track(): def microphone(track_id: str): return SimpleNamespace( user_id="user", - source_id="rainbow", + source_id="capture-node", source_item_id="chunk-1", locator=EvidenceLocator( - capture_source_id="rainbow", modality="audio", track_id=track_id + capture_source_id="capture-node", modality="audio", track_id=track_id ), metadata={"direction": "input"}, ) - assert _audio_capture_source_id("rainbow", "input", [microphone("desk-mic")]) == ( - "rainbow:input:desk-mic" - ) + assert _audio_capture_source_id( + "capture-node", "input", [microphone("desk-mic")] + ) == ("capture-node:input:desk-mic") assert ( - _audio_capture_source_id("rainbow", "input", [microphone("headset-mic")]) - == "rainbow:input:headset-mic" + _audio_capture_source_id("capture-node", "input", [microphone("headset-mic")]) + == "capture-node:input:headset-mic" ) def test_audio_evidence_item_retains_provider_local_track_locator(): started_at = datetime(2026, 9, 3, tzinfo=timezone.utc) locator = EvidenceLocator( - capture_source_id="rainbow", modality="audio", track_id="desk-mic" + capture_source_id="capture-node", modality="audio", track_id="desk-mic" ) span = SimpleNamespace( id="span-1", user_id="user", - source_id="rainbow", + source_id="capture-node", locator=locator, source_item_ids=["chunk-1"], first_source_item_id="chunk-1", @@ -324,7 +324,7 @@ async def to_list(self): class PendingItem: user_id = "507f1f77bcf86cd799439011" - source_id = "rainbow" + source_id = "capture-node" source_item_id = "audio-1" kind = "audio" state = "received" @@ -332,7 +332,7 @@ class PendingItem: ended_at = captured_at + timedelta(seconds=30) metadata = {"direction": "input"} locator = EvidenceLocator( - capture_source_id="rainbow", modality="audio", track_id="desk-mic" + capture_source_id="capture-node", modality="audio", track_id="desk-mic" ) deleted = False @@ -352,7 +352,7 @@ async def delete(self): ) events = [] captured_range = AudioRangeRef( - capture_source_id="rainbow:input", + capture_source_id="capture-node:input", time_basis="recorded", chunk_ids=["507f1f77bcf86cd799439012"], capture_session_ids=["screenpipe-capture"], @@ -439,9 +439,9 @@ async def test_speech_materializes_a_visible_conversation_claim(monkeypatch, tmp source_item = SimpleNamespace( source_item_id="audio-1", user_id="user-1", - source_id="rainbow", + source_id="capture-node", locator=EvidenceLocator( - capture_source_id="rainbow", modality="audio", track_id="desk-mic" + capture_source_id="capture-node", modality="audio", track_id="desk-mic" ), captured_at=started_at, ended_at=started_at + timedelta(seconds=30), @@ -470,7 +470,7 @@ async def test_speech_materializes_a_visible_conversation_claim(monkeypatch, tmp profile=profile, ) audio_range = AudioRangeRef( - capture_source_id="rainbow:input", + capture_source_id="capture-node:input", time_basis="recorded", chunk_ids=["507f1f77bcf86cd799439012"], started_at=segment.started_at, @@ -514,7 +514,7 @@ def find(*_args, **_kwargs): conversation_id = await _ingest_segment( SimpleNamespace(id="user-1"), - "rainbow", + "capture-node", "input", segment, audio_range, @@ -523,7 +523,7 @@ def find(*_args, **_kwargs): assert conversation_id == "conversation-1" assert received["data_purpose"] == "conversation" assert received["external_source_id"] == ( - "screenpipe:rainbow:input:desk-mic:audio-1-audio-1" + "screenpipe:capture-node:input:desk-mic:audio-1-audio-1" ) # VAD creates a provisional source record. It must remain memory-eligible so a # later settled conversational Timeline episode can dispatch the memory write; diff --git a/backend/tests/test_device_input_routes_helpers.py b/backend/tests/test_device_input_routes_helpers.py index 4bf0732f..d69d23b6 100644 --- a/backend/tests/test_device_input_routes_helpers.py +++ b/backend/tests/test_device_input_routes_helpers.py @@ -164,12 +164,12 @@ async def find_one(*_args): direction="input", content_hash=hashlib.sha256(payload).hexdigest(), meeting_id=None, - source=SimpleNamespace(user_id="user", source_id="screenpipe-rainbow"), + source=SimpleNamespace(user_id="user", source_id="screenpipe-capture-node"), ) assert response == {"status": "accepted", "item_id": "item-1"} assert captured["locator"].model_dump() == { - "capture_source_id": "screenpipe-rainbow", + "capture_source_id": "screenpipe-capture-node", "modality": "audio", "track_id": "Desk Mic (input)", } @@ -184,11 +184,11 @@ async def test_observation_open_race_rejects_conflicting_immutable_identity( captured_at = datetime(2026, 9, 3, tzinfo=timezone.utc) existing = SimpleNamespace( user_id="user", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", kind="observation", source_item_id="observation:42", locator=EvidenceLocator( - capture_source_id="screenpipe-rainbow", + capture_source_id="screenpipe-capture-node", modality="screen", track_id="display-one", ), @@ -226,7 +226,7 @@ async def collide(_self): ) ] ), - SimpleNamespace(user_id="user", source_id="screenpipe-rainbow"), + SimpleNamespace(user_id="user", source_id="screenpipe-capture-node"), ) assert exc_info.value.status_code == 409 @@ -245,11 +245,11 @@ def _audio_item(*, track_id: str = "Desk Mic (input)", digest: str): captured_at = datetime(2026, 9, 3, tzinfo=timezone.utc) return SimpleNamespace( user_id="user", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", kind="audio", source_item_id="42", locator=EvidenceLocator( - capture_source_id="screenpipe-rainbow", + capture_source_id="screenpipe-capture-node", modality="audio", track_id=track_id, ), @@ -270,7 +270,7 @@ async def _ingest_audio(payload: bytes = b"fixture-audio"): direction="input", content_hash=hashlib.sha256(payload).hexdigest(), meeting_id=None, - source=SimpleNamespace(user_id="user", source_id="screenpipe-rainbow"), + source=SimpleNamespace(user_id="user", source_id="screenpipe-capture-node"), ) @@ -334,7 +334,7 @@ async def no_item(*_args): async def compacted(*_args): return SimpleNamespace( locator=EvidenceLocator( - capture_source_id="screenpipe-rainbow", + capture_source_id="screenpipe-capture-node", modality="audio", track_id="System Audio (output)", ) @@ -365,11 +365,13 @@ async def test_complete_job_replays_bson_timestamp_precision( {"captured_at": captured_at, "ended_at": ended_at} ).decode() locator = EvidenceLocator( - capture_source_id="screenpipe-rainbow", modality="screen", track_id="monitor_35" + capture_source_id="screenpipe-capture-node", + modality="screen", + track_id="monitor_35", ) existing = device_input_model( user_id="user", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", kind="screen_context", source_item_id="frame:130882", locator=locator, @@ -385,7 +387,7 @@ async def test_complete_job_replays_bson_timestamp_precision( elif conflict == "locator": incoming_locator = locator.model_copy(update={"track_id": "monitor_1309"}) job = SimpleNamespace( - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", context_request_id=None, status="claimed", purpose="conversation_enrichment", @@ -416,7 +418,7 @@ async def test_complete_job_replays_bson_timestamp_precision( ) ] ) - source = SimpleNamespace(user_id="user", source_id="screenpipe-rainbow") + source = SimpleNamespace(user_id="user", source_id="screenpipe-capture-node") if conflict: with pytest.raises(device_input_routes.HTTPException) as exc: await device_input_routes.complete_job("job", body, source) diff --git a/backend/tests/test_evidence_broker.py b/backend/tests/test_evidence_broker.py index 953f319e..f87dff90 100644 --- a/backend/tests/test_evidence_broker.py +++ b/backend/tests/test_evidence_broker.py @@ -134,9 +134,9 @@ def _span(index: int, started_at: datetime, *, direction: str = "input"): return SimpleNamespace( id=f"span-{index}", user_id="user-1", - source_id="rainbow", + source_id="capture-node", locator=EvidenceLocator( - capture_source_id="rainbow", + capture_source_id="capture-node", modality="audio", track_id=f"{direction}:device-{index}", ), diff --git a/backend/tests/test_memory_agent_completion.py b/backend/tests/test_memory_agent_completion.py index 704455f6..3a5be396 100644 --- a/backend/tests/test_memory_agent_completion.py +++ b/backend/tests/test_memory_agent_completion.py @@ -94,7 +94,7 @@ async def chat(messages, **_kwargs): await MemoryAgent(tmp_path).run( "I am showing the notebook now.", "conversation-1", - images=[("rainbow.png", b"real-pixel-bytes")], + images=[("selected-frame.png", b"real-pixel-bytes")], ) content = captured["messages"][1]["content"] diff --git a/backend/tests/test_memory_setup_wizard.py b/backend/tests/test_memory_setup_wizard.py index 8cc6c51d..49551645 100644 --- a/backend/tests/test_memory_setup_wizard.py +++ b/backend/tests/test_memory_setup_wizard.py @@ -251,7 +251,7 @@ def test_wizard_removes_obsolete_pi_model_but_preserves_explicit_limits(init_mod }, "backends": { "pi": { - "model": "old-kraken-model", + "model": "old-backend-node-model", "context_window": 8192, "max_tokens": 2048, } diff --git a/backend/tests/test_memory_space_context.py b/backend/tests/test_memory_space_context.py index 35e331f0..ed65c335 100644 --- a/backend/tests/test_memory_space_context.py +++ b/backend/tests/test_memory_space_context.py @@ -51,7 +51,7 @@ async def test_returned_frames_are_bounded_and_only_explicit_selection_is_admitt conversation = _conversation(memory_review_state="context_requested") job = DeviceInputJob.model_construct( user_id="user-1", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", purpose="memory_space_note_review", payload={ "conversation_id": conversation.conversation_id, @@ -117,7 +117,7 @@ async def run_structured(prompt, images, schema, settings): lambda: SimpleNamespace(vision=vision_settings), ) frame = Conversation.MemoryContextFrame( - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", frame_id=42, captured_at=datetime(2026, 8, 30, 5, 16, tzinfo=timezone.utc), content_type="image/jpeg", diff --git a/backend/tests/test_pi_executor.py b/backend/tests/test_pi_executor.py index d2fdf3c4..13bcaad6 100644 --- a/backend/tests/test_pi_executor.py +++ b/backend/tests/test_pi_executor.py @@ -53,7 +53,7 @@ def no_inference_artifact_writes(monkeypatch, tmp_path): def _runtime_config( *, api_key="super-secret-key", - base_url="http://kraken:8083/v1", + base_url="http://backend-node:8083/v1", temperature=0.2, sampling=None, response_format=None, @@ -270,7 +270,7 @@ async def prompt(*_args, **_kwargs): await PiMemoryAgent(root).run( "I am showing the notebook now.", "conversation-1", - images=[("rainbow.png", b"selected-frame")], + images=[("selected-frame.png", b"selected-frame")], ) attachments = [arg for arg in captured["command"] if arg.startswith("@")] @@ -331,7 +331,7 @@ def test_config_uses_registry_operation_budget_without_backend_model_override( reasoning_allowed=True, model_def=model_def, model_name="upstream/qwen:Q4_K_M", - base_url="http://kraken:8083/v1", + base_url="http://backend-node:8083/v1", api_key=None, max_tokens=9000, reasoning_effort="medium", @@ -367,7 +367,7 @@ def test_config_uses_registry_operation_budget_without_backend_model_override( assert calls == [("memory_write", None)] assert config.provider == "chronicle-llama-cpp-local" assert config.model == "upstream/qwen:Q4_K_M" - assert config.base_url == "http://kraken:8083/v1" + assert config.base_url == "http://backend-node:8083/v1" assert config.api_key == "no-key" assert config.thinking == "low" assert config.max_tokens == 9000 diff --git a/backend/tests/test_timeline_evidence.py b/backend/tests/test_timeline_evidence.py index ea03a260..b1116c22 100644 --- a/backend/tests/test_timeline_evidence.py +++ b/backend/tests/test_timeline_evidence.py @@ -58,8 +58,8 @@ def test_adjacent_app_rows_are_compacted_without_becoming_episode_boundaries(): TimelineEvidenceItem( evidence_id=f"observation:{index}", kind="observation", - source_id="rainbow", - locator=_screen_locator("rainbow"), + source_id="capture-node", + locator=_screen_locator("capture-node"), started_at=start, ended_at=start, role="application_state", @@ -158,11 +158,11 @@ def test_same_window_on_different_browser_pages_is_not_compacted(): def test_adjacent_distinct_games_remain_separate_evidence(): start = datetime(2026, 8, 6, tzinfo=timezone.utc) - aoe = _app_item("aoe", "rainbow", start) + aoe = _app_item("aoe", "capture-node", start) aoe.metadata.update( {"app_name": "steam_app_1466860", "window_name": "Age of Empires IV"} ) - rematch = _app_item("rematch", "rainbow", start + timedelta(seconds=10)) + rematch = _app_item("rematch", "capture-node", start + timedelta(seconds=10)) rematch.metadata.update({"app_name": "steam_app_2138720", "window_name": "REMATCH"}) compacted = _coalesce_application_evidence([aoe, rematch]) @@ -221,8 +221,8 @@ def test_open_observation_uses_latest_marker_as_provisional_end(): row = SimpleNamespace( id="open-game", user_id="user", - source_id="rainbow", - locator=_screen_locator("rainbow"), + source_id="capture-node", + locator=_screen_locator("capture-node"), kind="observation", source_item_id="observation:open-game", captured_at=start, diff --git a/backend/tests/test_timeline_evidence_contracts.py b/backend/tests/test_timeline_evidence_contracts.py index b5d5c764..0c0190ca 100644 --- a/backend/tests/test_timeline_evidence_contracts.py +++ b/backend/tests/test_timeline_evidence_contracts.py @@ -26,14 +26,14 @@ def _item(identifier: str, track_id: str) -> TimelineEvidenceItem: locator = EvidenceLocator( - capture_source_id="screenpipe-rainbow", + capture_source_id="screenpipe-capture-node", modality="screen", track_id=track_id, ) return TimelineEvidenceItem( evidence_id=identifier, kind="observation", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", locator=locator, started_at=START, ended_at=START + timedelta(minutes=1), @@ -49,7 +49,7 @@ def test_device_input_requires_a_typed_locator_at_ingress(): with pytest.raises(ValidationError, match="locator"): DeviceInputItem( user_id="user", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", kind="observation", source_item_id="observation:1", captured_at=START, @@ -61,7 +61,7 @@ def test_device_input_rejects_locator_for_a_different_capture_source(): with pytest.raises(ValueError, match="authenticated source"): DeviceInputItem( user_id="user", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", kind="observation", source_item_id="observation:1", captured_at=START, @@ -111,11 +111,11 @@ def test_context_compaction_never_combines_simultaneous_display_tracks(): def test_device_evidence_retains_full_samples_and_resolvable_frame_anchors(): row = SimpleNamespace( id="row-one", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", kind="observation", source_item_id="observation:1", locator=EvidenceLocator( - capture_source_id="screenpipe-rainbow", + capture_source_id="screenpipe-capture-node", modality="screen", track_id="Display 2", ), @@ -191,7 +191,7 @@ def test_manifest_resolves_exact_anchor_and_rejects_unsupported_interior_boundar def test_manifest_rejects_anchor_for_unknown_evidence(): locator = EvidenceLocator( - capture_source_id="screenpipe-rainbow", + capture_source_id="screenpipe-capture-node", modality="screen", track_id="Display 1", ) diff --git a/backend/tests/test_timeline_source_ids.py b/backend/tests/test_timeline_source_ids.py index ea25136c..14f53720 100644 --- a/backend/tests/test_timeline_source_ids.py +++ b/backend/tests/test_timeline_source_ids.py @@ -9,13 +9,13 @@ def test_current_segment_id_round_trips_track_separately_from_source_range(): external = format_screenpipe_segment_source_id( - "rainbow", "input", "audio:desk-mic", "71360", "71369" + "capture-node", "input", "audio:desk-mic", "71360", "71369" ) - assert external == "screenpipe:rainbow:input:audio:desk-mic:71360-71369" + assert external == "screenpipe:capture-node:input:audio:desk-mic:71360-71369" parsed = parse_screenpipe_segment_source_id(external) assert parsed is not None - assert parsed.capture_source_id == "rainbow" + assert parsed.capture_source_id == "capture-node" assert parsed.direction == "input" assert parsed.track_id == "audio:desk-mic" assert parsed.source_range == "71360-71369" @@ -23,13 +23,13 @@ def test_current_segment_id_round_trips_track_separately_from_source_range(): def test_current_segments_share_transcript_track_when_only_range_changes(): first = transcript_evidence_locator( - "screenpipe:rainbow:input:desk-mic:71360-71369", + "screenpipe:capture-node:input:desk-mic:71360-71369", "client", "conversation-1", "input", ) second = transcript_evidence_locator( - "screenpipe:rainbow:input:desk-mic:71370-71379", + "screenpipe:capture-node:input:desk-mic:71370-71379", "client", "conversation-2", "input", @@ -41,20 +41,20 @@ def test_current_segments_share_transcript_track_when_only_range_changes(): def test_legacy_segment_range_is_not_guessed_to_be_a_track(): first = transcript_evidence_locator( - "screenpipe:rainbow:input:71360-71369", + "screenpipe:capture-node:input:71360-71369", "client", "conversation-1", "input", ) second = transcript_evidence_locator( - "screenpipe:rainbow:input:71370-71379", + "screenpipe:capture-node:input:71370-71379", "client", "conversation-2", "input", ) assert first == second - assert first.capture_source_id == "rainbow" + assert first.capture_source_id == "capture-node" assert first.track_id is None @@ -72,4 +72,4 @@ def test_oldest_legacy_segment_omits_direction_and_track_honestly(): def test_malformed_screenpipe_segment_id_fails_instead_of_guessing(): with pytest.raises(ValueError, match="malformed ScreenPipe"): - parse_screenpipe_segment_source_id("screenpipe:rainbow:not-a-range") + parse_screenpipe_segment_source_id("screenpipe:capture-node:not-a-range") diff --git a/backend/tests/test_transcript_ingest_integrity.py b/backend/tests/test_transcript_ingest_integrity.py index 7286b1fa..90d57bdf 100644 --- a/backend/tests/test_transcript_ingest_integrity.py +++ b/backend/tests/test_transcript_ingest_integrity.py @@ -62,12 +62,12 @@ def test_alignment_url_requires_explicit_model_capability(monkeypatch): def test_alignment_url_uses_capable_local_asr_origin(monkeypatch): model = SimpleNamespace( capabilities=["transcription", "forced_alignment"], - resolved_url=lambda: "http://rainbow:8767/transcribe?format=json", + resolved_url=lambda: "http://capture-node:8767/transcribe?format=json", ) registry = SimpleNamespace(get_default=lambda model_type: model) monkeypatch.setattr(forced_alignment, "get_models_registry", lambda: registry) - assert forced_alignment._align_url() == "http://rainbow:8767/align" + assert forced_alignment._align_url() == "http://capture-node:8767/align" def test_speaker_batches_are_bounded_by_count_and_total_duration(): diff --git a/backend/webui/scripts/live_audio_v2_e2e.py b/backend/webui/scripts/live_audio_v2_e2e.py index 498707ee..48d7d8bb 100644 --- a/backend/webui/scripts/live_audio_v2_e2e.py +++ b/backend/webui/scripts/live_audio_v2_e2e.py @@ -2,7 +2,7 @@ Run with an explicitly non-sensitive 16 kHz mono WAV fixture: uv run --with playwright python scripts/live_audio_v2_e2e.py \ - --audio /tmp/smallest-official-16k.wav + --base https://chronicle.example.com --audio /tmp/smallest-official-16k.wav """ import argparse @@ -51,7 +51,9 @@ def _conversation_id(conversation: dict) -> str | None: def main() -> None: parser = argparse.ArgumentParser() parser.add_argument("--audio", type=Path, required=True) - parser.add_argument("--base", default="https://kraken.parrot-census.ts.net") + parser.add_argument( + "--base", required=True, help="Chronicle deployment URL to test." + ) parser.add_argument("--seconds", type=int, default=12) parser.add_argument( "--expect-wakeword", diff --git a/backend/webui/src/components/ServiceDeployments.test.tsx b/backend/webui/src/components/ServiceDeployments.test.tsx index 2b6e2360..21624e7f 100644 --- a/backend/webui/src/components/ServiceDeployments.test.tsx +++ b/backend/webui/src/components/ServiceDeployments.test.tsx @@ -20,18 +20,18 @@ vi.mock("../services/api", () => ({ })); const plan = { revision: 3, - nodes: { rainbow: "http://rainbow:8775", kraken: "http://kraken:8775" }, + nodes: { "capture-node": "http://capture-node:8775", "backend-node": "http://backend-node:8775" }, deployments: { "speaker-recognition": { mode: "single", state: "speaker_catalog", instances: [ { - node: "rainbow", + node: "capture-node", endpoints: { speaker: { - url: "http://rainbow:8085", - health_url: "http://rainbow:8085/readiness", + url: "http://capture-node:8085", + health_url: "http://capture-node:8085/readiness", readiness: { status: "ok" }, }, }, @@ -52,9 +52,9 @@ beforeEach(() => { service: "speaker-recognition", endpoint: "speaker", mode: "single", - selected_node: "rainbow", + selected_node: "capture-node", instances: [ - { node: "rainbow", healthy: true, reason: "Ready" }, + { node: "capture-node", healthy: true, reason: "Ready" }, ], }, ], @@ -79,21 +79,21 @@ function show() { it("shows configured owner and selected request destination", async () => { show(); expect(await screen.findByText("Single owner")).toBeTruthy(); - expect(await screen.findByText("speaker: serving from rainbow")).toBeTruthy(); + expect(await screen.findByText("speaker: serving from capture-node")).toBeTruthy(); }); it("saves the expected revision and leaves container actions separate", async () => { show(); fireEvent.click(await screen.findByText("Configure placement")); fireEvent.change( screen.getByLabelText("speaker-recognition instance 1 node"), - { target: { value: "kraken" } }, + { target: { value: "backend-node" } }, ); fireEvent.click(screen.getByText("Save placement")); await waitFor(() => expect(put).toHaveBeenCalled()); const payload = put.mock.calls[0][1]; expect(payload.revision).toBe(3); expect(payload.deployments["speaker-recognition"].instances[0].node).toBe( - "kraken", + "backend-node", ); expect(put.mock.calls[0][0]).toBe("/api/admin/service-deployments"); }); diff --git a/backend/webui/src/pages/MemorySpaceWorkspace.test.tsx b/backend/webui/src/pages/MemorySpaceWorkspace.test.tsx index dc65d98d..080f705a 100644 --- a/backend/webui/src/pages/MemorySpaceWorkspace.test.tsx +++ b/backend/webui/src/pages/MemorySpaceWorkspace.test.tsx @@ -123,7 +123,7 @@ describe('MemorySpaceWorkspace scope', () => { vi.spyOn(memorySpacesApi, 'get').mockResolvedValue({ data: { space_id: SPACE_ID, - name: 'Rainbow ramble', + name: 'Capture node ramble', state: 'active', seed_notes: [], sync_state: 'healthy', @@ -149,11 +149,11 @@ describe('MemorySpaceWorkspace scope', () => { review_error: null, selected_frame_keys: [], context_description: null, - sources: [{ source_id: 'screenpipe-rainbow', name: 'Rainbow', platform: 'linux', status: 'online', last_seen_at: '2026-08-30T05:19:00Z', health: {} }], + sources: [{ source_id: 'screenpipe-capture-node', name: 'Capture node', platform: 'linux', status: 'online', last_seen_at: '2026-08-30T05:19:00Z', health: {} }], jobs: [], frames: [ - { key: 'screenpipe-rainbow:41', source_id: 'screenpipe-rainbow', frame_id: 41, captured_at: '2026-08-30T05:16:00Z', content_type: 'image/jpeg' }, - { key: 'screenpipe-rainbow:42', source_id: 'screenpipe-rainbow', frame_id: 42, captured_at: '2026-08-30T05:17:00Z', content_type: 'image/jpeg' }, + { key: 'screenpipe-capture-node:41', source_id: 'screenpipe-capture-node', frame_id: 41, captured_at: '2026-08-30T05:16:00Z', content_type: 'image/jpeg' }, + { key: 'screenpipe-capture-node:42', source_id: 'screenpipe-capture-node', frame_id: 42, captured_at: '2026-08-30T05:17:00Z', content_type: 'image/jpeg' }, ], }, } as never) @@ -173,7 +173,7 @@ describe('MemorySpaceWorkspace scope', () => { await waitFor(() => expect(extract).toHaveBeenCalledWith( SPACE_ID, conversationId, - ['screenpipe-rainbow:42'], + ['screenpipe-capture-node:42'], )) // Let the mutation's post-success refetches settle before afterEach restores // the API spies; otherwise an in-flight query can fall through to localhost. diff --git a/docs/backend/audio-interface-map.md b/docs/backend/audio-interface-map.md index 5abb193e..5824a1df 100644 --- a/docs/backend/audio-interface-map.md +++ b/docs/backend/audio-interface-map.md @@ -144,12 +144,12 @@ test and a deployed trace both exist. `a421c9-audiov2dep-3971e53a6a254ceab71bb28de68a1bfd` and one canonical 1.1-second `audio_chunks` document with captured time 21:03:55 IST. The deleted `/ws` endpoint rejects a WebSocket upgrade with HTTP 403. -- **21:00 IST operational finding:** Kraken's root filesystem is 100% utilized with +- **21:00 IST operational finding:** the validation host's root filesystem is 100% utilized with about 370 MB free. ScreenPipe's finite-ingest path is actively logging `ENOSPC` while writing large temporary WAVs. This did not prevent the small V2 durability probe, but it is a separate production retention/capacity incident and makes larger capture/build operations unsafe until space is reclaimed or temp storage moves to - `/mnt/wsl/data`. + a separate data volume. - **21:12 IST:** isolated the cutover from the heavily dirty `dev` checkout on `feature/audio-v2-cutover`, committed it as `4a73a5ff`, and pushed only runtime audio code, generated contracts, clients, tests, and canonical docs. Local wake-word @@ -296,7 +296,7 @@ test and a deployed trace both exist. unclosed Mongo client warning from Timeline dispatch tests. - **11:26 IST:** cut Chronicle off OpenRouter after its exhausted allowance continued surfacing historical/live errors. `defaults.llm`, `defaults.fast_llm`, and - `defaults.fallback_llm` now all resolve to Kraken's local `qwen3.8-llm`; the two + `defaults.fallback_llm` now all resolve to the validation host's local `qwen3.8-llm`; the two explicit overrides (`memory_write` and `timeline_consolidation`) were moved to the same model. Backend and worker runtime inspection confirms every registered LLM operation resolves to provider `llamacpp` at `http://llama-cpp-llm:8080/v1`. diff --git a/docs/full-duplex-voice-validation-2026-08-16.md b/docs/full-duplex-voice-validation-2026-08-16.md index 5281786a..e1c6779b 100644 --- a/docs/full-duplex-voice-validation-2026-08-16.md +++ b/docs/full-duplex-voice-validation-2026-08-16.md @@ -27,7 +27,7 @@ backfill apply, app release, live Swiggy request, or payment was performed. | Branch | `feature/full-duplex-voice-cutover` | | Implementation candidate | `02b7a3b89d22b097935fb60fb86dec59f4d918a0` | | Base lineage | `dev`, with curated source changes committed at `210e0c73` | -| Host | `Kraken` | +| Host | Linux validation host | | OS | Linux 6.6.87.2 WSL2, x86_64 | | Date | 2026-08-16 UTC | | Test container engine | Podman | @@ -119,10 +119,10 @@ Portable post-fix checks passed: `app/modules/chronicle-duplex-audio/ios/Package.swift` now makes the production-used Swift cancellation/state policy tests directly runnable with `swift test`. They remain -unexecuted on this Linux host and are a required Rainbow gate. The Android policy tests +unexecuted on this Linux host and are a required native-toolchain gate. The Android policy tests likewise remain unexecuted until an Android toolchain is available. -The executable `scripts/rainbow-testflight-handoff.sh` fetches an exact remote SHA into +The executable `scripts/ios-testflight-handoff.sh` fetches an exact remote SHA into a new detached worktree, runs the portable checks and Swift package tests, and prints the explicit TestFlight workflow-dispatch command. It does not contain credentials or upload a build by itself. diff --git a/docs/init-system.md b/docs/init-system.md index 81b38ddd..9072cff9 100644 --- a/docs/init-system.md +++ b/docs/init-system.md @@ -277,9 +277,9 @@ The current node is the default. Remote operations require an explicit registere node ID; selection never silently moves to another owner: ```bash -./services status --node rainbow -./services restart tts --node rainbow -./services logs tts --node rainbow --tail 100 +./services status --node NODE_ID +./services restart tts --node NODE_ID +./services logs tts --node NODE_ID --tail 100 ``` `--all` start/restart selects enabled services allowed on that node by the placement @@ -305,7 +305,7 @@ failure without rolling back or resubmitting. Exit codes are 0 for success/accep ./services start llm-services --timeout 600 ./services start llm-services --no-wait ./services operation OPERATION_ID -./services operation OPERATION_ID --node rainbow --json +./services operation OPERATION_ID --node NODE_ID --json ``` `--no-wait` returns after acceptance; the manager continues readiness checks. Ctrl-C diff --git a/docs/pi-qwen-memory-evaluation-2026-08-06.md b/docs/pi-qwen-memory-evaluation-2026-08-06.md index 4cde45af..7bf9c16f 100644 --- a/docs/pi-qwen-memory-evaluation-2026-08-06.md +++ b/docs/pi-qwen-memory-evaluation-2026-08-06.md @@ -7,7 +7,7 @@ Date: 2026-08-06 Pi is the recommended first-class local-Qwen backend for Chronicle memory writes and searches. In the A30 write evaluation it completed every primary write, had the strongest semantic coverage, used fewer tokens and tool calls, and materially improved tail latency -over Chronicle's direct tool loop. In the corrected, matched-budget Kraken retrieval run, +over Chronicle's direct tool loop. In the corrected, matched-budget retrieval run on the validation host, Pi was fully correct on five of six questions versus four of six for Direct and recovered all expected answerable fact atoms. Direct remains useful as an explicit write-recovery backend and as the faster retrieval diagnostic path. @@ -20,7 +20,7 @@ synthesis after reaching the search-round cap. ## What was evaluated - One NVIDIA A30 with 24 GB VRAM for the audited write suite and context profiling. -- Kraken's NVIDIA RTX 4090 for the corrected retrieval comparison and local smoke test. +- The validation host's NVIDIA RTX 4090 for the corrected retrieval comparison and local smoke test. - `unsloth/Qwen3.6-27B-GGUF:Q4_K_M`, approximately 16.8 GB. - llama.cpp b10290 at commit `c8e03ce`. - A text-only 64K context profile with flash attention, Q8 K/V cache, one parallel @@ -29,7 +29,7 @@ synthesis after reaching the search-round cap. - Eight audited write cases, each run into an isolated vault. - Six retrieval questions over immutable copies of a fixed vault, including two cases authored as negative controls and one additional question the vault could not answer. -- The final retrieval comparison used the same Kraken model endpoint, temperature 0.2, +- The final retrieval comparison used the same validation-host model endpoint, temperature 0.2, 2,048-token output limit, six search rounds, and source vault for both executors. The Codex write column below is a historical semantic comparator, not a contemporaneous performance run. @@ -87,7 +87,7 @@ for every transcript class. ## Retrieval results -### Corrected matched-budget run on Kraken +### Corrected matched-budget run on the validation host | Executor | Completed | Fully correct | Answerable fact coverage | Correct abstentions | Unsupported additions | Wall time | |---|---:|---:|---:|---:|---:|---:| @@ -112,7 +112,7 @@ The first A30 pass was not decision-grade: a pause/resume had removed system-ins `ripgrep`, Pi's terminal failure sentinel counted as an answer, and both loops could lose evidence gathered on their last allowed tool turn. The implementation now rejects failure sentinels as answers, hard-caps tool calls, and permits one bounded tools-disabled -synthesis only from audited evidence. The Kraken rerun above had working `rg` and records +synthesis only from audited evidence. The validation-host rerun above had working `rg` and records the effective Pi temperature in its provenance. ## Private network topology @@ -127,12 +127,12 @@ Tailnet client -> http://llama-cpp-llm:8080/v1 on Chronicle's private container network ``` -Kraken now uses that container-DNS endpoint for backend and worker requests. The optional +The validation host now uses that container-DNS endpoint for backend and worker requests. The optional host diagnostic ports for the LLM and embedding server bind only to `127.0.0.1`; no Jarvis endpoint exists, and all Jarvis machines are paused. Tailscale is connected, with neither Serve nor Funnel configured at evaluation time. -Chronicle's Caddy/backend ports currently listen on all Kraken host interfaces. That is +Chronicle's Caddy/backend ports currently listen on all validation-host interfaces. That is not a Tailscale Funnel or automatic public-internet publication, but it permits LAN access and relies on the host/router boundary. A strict Tailnet-only cutover should bind Chronicle ingress to loopback and place Tailscale Serve in front after client URLs and certificates @@ -184,7 +184,7 @@ are checked. That live ingress change was intentionally not made during the mode healthy. - A synthetic local Pi write reached primary canonical completion in 16.4 seconds with five tool calls, no fallback, no errors, and no vault invariant violations. -- Kraken's `/readiness` endpoint returns `ready`; its model and memory probes connect. +- The validation host's `/readiness` endpoint returns `ready`; its model and memory probes connect. The broader legacy `/health` endpoint currently reports `critical` because its Redis probe attempts a signal operation from a non-main thread. That separate probe defect does not indicate a failed model or memory connection. @@ -197,12 +197,12 @@ are checked. That live ingress change was intentionally not made during the mode 3. Canary Pi retrieval on one non-critical vault and retain Direct as a fast diagnostic selector while watching cap warnings and unsupported-answer rate. 4. Run Chronicle's setup wizard before rebuilding/restarting Chronicle with Pi selected. - Existing obsolete memory keys are intentionally rejected, so Kraken will not silently + Existing obsolete memory keys are intentionally rejected, so the validation host will not silently switch to Direct or another model. 5. Roll out writes to one non-critical vault first and monitor latency, truncation, tool-error, recovery, and invariant metrics before broad ingestion. -Kraken's live llama.cpp profile and private model routing were changed and restarted, with +The validation host's live llama.cpp profile and private model routing were changed and restarted, with rollback copies of the prior configuration retained. The Chronicle Pi application code is merged into `dev`, but the live backend/workers were not rebuilt or restarted as part of that merge. They continue running the prior process image until the wizard and deliberate @@ -212,7 +212,7 @@ image rebuild/rollout are performed. The observed final A30 write suite cost ₹38.88. Earlier A30 context and exploratory work is estimated at about ₹60, for approximately ₹99 total. The corrected retrieval rerun -used Kraken and added no Jarvis compute cost. Cost is approximate because the earlier +used the validation host and added no Jarvis compute cost. Cost is approximate because the earlier exploratory session was not captured as one final billing record. Limitations include eight write cases, six retrieval questions, one run per case, no diff --git a/docs/podman.md b/docs/podman.md index 348075a3..a31bdff4 100644 --- a/docs/podman.md +++ b/docs/podman.md @@ -150,7 +150,7 @@ internally by querying `podman ps` scoped to the compose project label. problem is the mount). Git cannot store an empty directory, so any runtime dir a compose file mounts is missing on a fresh checkout. The failure is quiet: the container is left in `created`, not `exited`, so nothing is listening and - `./services start --all` reports success for the rest of the stack. Seen on kraken, where + `./services start --all` reports success for the rest of the stack. Observed on a deployment where `extras/asr-services`' `./debug` and `./lora_adapters` left the ASR service unstarted for days and dictation 503'd with "Cannot reach transcription service". Fix: commit a `.gitkeep` in each mounted runtime dir (done for those diff --git a/docs/screenpipe-fork-sync.md b/docs/screenpipe-fork-sync.md index af7b058b..c5d5b77f 100644 --- a/docs/screenpipe-fork-sync.md +++ b/docs/screenpipe-fork-sync.md @@ -1,82 +1,50 @@ # Screenpipe fork sync -Chronicle consumes the `chronicle` branch of -[`AnkushMalaker/screenpipe`](https://github.com/AnkushMalaker/screenpipe). It is -a single patch stack rebased directly onto `screenpipe/screenpipe`'s `main`. -The older `custom/linux-timeline-stability` intermediate branch no longer -exists; its commits were folded into `chronicle` in August 2026. +Chronicle's recorder source is the `chronicle-recorder` branch of +[`AnkushMalaker/screenpipe`](https://github.com/AnkushMalaker/screenpipe), based +directly on upstream `screenpipe/screenpipe` `main`. The historical `chronicle` +branch remains intact; the new branch does not replay its old history. ## Automated sync -`.github/workflows/sync-screenpipe-fork.yml` runs daily and can also be started -manually. It: - -1. checks out the fork's `chronicle` branch with full history; -2. fetches only `main` from upstream; -3. rebases `chronicle` onto `upstream/main` when it is behind; -4. pushes with `--force-with-lease`; and -5. opens or updates a Chronicle issue if the rebase conflicts. +`.github/workflows/sync-screenpipe-fork.yml` runs daily from Chronicle's default +branch, `dev`, and can also be started manually. It checks out `chronicle-recorder` +with full history, fetches upstream `main`, and rebases when upstream advances. +A successful rebase pushes with `--force-with-lease`; conflicts leave the fork +unchanged and open or update a Chronicle issue. This workflow checks whether the +rebase applies; it does not build, install, or validate the recorder on a device. The workflow needs the `SCREENPIPE_FORK_TOKEN` repository secret with write -access to `AnkushMalaker/screenpipe`. A manual dry run can be dispatched with: +access to the fork. Start a manual dry run with: ```bash -gh workflow run sync-screenpipe-fork.yml -F push=false +gh workflow run sync-screenpipe-fork.yml --ref dev -F push=false ``` -Use `-F`, not `-f`, so GitHub receives a boolean rather than the truthy string -`"false"`. +Use `-F` to send a boolean. The workflow also rejects the string `"false"`. ## Local sync and conflict recovery -The fork is normally cloned at `untracked/screenpipe` with the upstream remote -named `origin` and the writable fork remote named `fork`. The script resolves -the remotes by URL, so their names are not a contract. - -First check divergence without changing the worktree: - -```bash -cd untracked/screenpipe -./sync-fork.sh --check -``` - -Then rebase locally. The script uses `--autostash` because Tauri builds commonly -leave generated schema changes in the worktree: - -```bash -./sync-fork.sh -``` - -If Git stops on a conflict, resolve it, stage the resolved files, and continue: +Use a fresh directory to preserve existing work. The commands below use `origin` +for the writable fork and fetch upstream directly by URL: ```bash -git add -git rebase --continue +git clone --branch chronicle-recorder https://github.com/AnkushMalaker/screenpipe.git screenpipe-sync +cd screenpipe-sync +expected=$(git rev-parse HEAD) +git fetch --no-tags https://github.com/screenpipe/screenpipe main +git rebase FETCH_HEAD ``` -Run tests appropriate to the touched Screenpipe areas (see the fork's -`AGENTS.md` and `TESTING.md`), then publish the rewritten branch: +Resolve conflicts, stage only the resolved files, and run `git rebase --continue`. +Use `git rebase --abort` to abandon the attempt. Review the diff and run tests +appropriate to the affected recorder areas before publishing. A clean rebase alone +does not prove capture, privacy, or audio behavior. ```bash -./sync-fork.sh --push +git push --force-with-lease=refs/heads/chronicle-recorder:$expected origin HEAD:refs/heads/chronicle-recorder ``` -The push deliberately uses `--force-with-lease`. Never replace it with an -unconditional force push. - -## Topology invariant - -The automation and `untracked/screenpipe/sync-fork.sh` must agree on this -relationship: - -```text -screenpipe/screenpipe main -> AnkushMalaker/screenpipe chronicle -``` - -When changing the branch topology, update both files together and verify the -remote branches with: - -```bash -git -C untracked/screenpipe ls-remote --heads fork chronicle -git -C untracked/screenpipe ls-remote --heads origin main -``` +The explicit expected commit protects concurrent changes to the remote branch. +Never replace it with an unconditional force push. Keep the workflow and this +runbook aligned; the recorder branch does not require a custom sync script. diff --git a/extras/chronicle-setup/tests/test_checks.py b/extras/chronicle-setup/tests/test_checks.py index 370fc676..408caa08 100644 --- a/extras/chronicle-setup/tests/test_checks.py +++ b/extras/chronicle-setup/tests/test_checks.py @@ -33,9 +33,9 @@ "BackendState": "Running", "AuthURL": "", "Self": { - "HostName": "Kraken", - "DNSName": "kraken.parrot-census.ts.net.", - "TailscaleIPs": ["100.83.66.30", "fd7a:115c:a1e0::ac01:4222"], + "HostName": "backend-node", + "DNSName": "backend-node.example.ts.net.", + "TailscaleIPs": ["100.64.0.10", "fd7a:115c:a1e0::10"], "Online": True, "KeyExpiry": "2027-01-28T05:28:38Z", }, @@ -44,7 +44,7 @@ # The broken state: daemon up, interface present, but no key. STATUS_LOGGED_OUT = json.dumps( - {"BackendState": "NeedsLogin", "AuthURL": "", "Self": {"HostName": "Kraken"}} + {"BackendState": "NeedsLogin", "AuthURL": "", "Self": {"HostName": "backend-node"}} ) # Epoch of the KeyExpiry above. Derived rather than hand-written, because an @@ -58,7 +58,7 @@ CERT_PEM = "-----BEGIN CERTIFICATE-----\nMIIB\n-----END CERTIFICATE-----\n" CERT_SUMMARY = ( "issuer=C = US, O = Let's Encrypt, CN = YE1\n" - "subject=CN = kraken.parrot-census.ts.net\n" + "subject=CN = backend-node.example.ts.net\n" "notAfter=Oct 28 13:47:26 2026 GMT\n" ) @@ -175,7 +175,7 @@ def test_magicdns_ok_when_container_resolves_the_node(monkeypatch, have_all_bina [ (["status"], (0, STATUS_RUNNING, "")), RUNNING_CONTAINER, - (["getent"], (0, "100.83.66.30 kraken.parrot-census.ts.net\n", "")), + (["getent"], (0, "100.64.0.10 backend-node.example.ts.net\n", "")), ] ), ) @@ -206,10 +206,10 @@ def test_magicdns_fails_when_only_public_upstreams_are_pinned( result = checks.check_container_magicdns(ctx) assert result.status == FAIL - assert "kraken.parrot-census.ts.net" in result.detail + assert "backend-node.example.ts.net" in result.detail assert "100.100.100.100" in (result.remedy or "") # Probed by the node's own name, trailing dot stripped. - assert runner.argv_containing("kraken.parrot-census.ts.net") + assert runner.argv_containing("backend-node.example.ts.net") def test_magicdns_not_applicable_without_a_tailnet(monkeypatch, have_all_binaries): @@ -248,7 +248,7 @@ def test_login_ok_when_running(monkeypatch, have_all_binaries): install(monkeypatch, FakeRunner([(["status"], (0, STATUS_RUNNING, ""))])) result = checks.check_tailscale_login(CheckContext()) assert result.status == OK - assert "kraken.parrot-census.ts.net" in result.detail + assert "backend-node.example.ts.net" in result.detail def test_login_fails_when_logged_out(monkeypatch, have_all_binaries): @@ -292,7 +292,9 @@ def test_key_expiry_fails_when_already_expired(monkeypatch, have_all_binaries): def test_key_expiry_ok_when_disabled(monkeypatch, have_all_binaries): """No KeyExpiry means expiry is disabled — the desired end state, not a gap.""" - status = json.dumps({"BackendState": "Running", "Self": {"HostName": "Kraken"}}) + status = json.dumps( + {"BackendState": "Running", "Self": {"HostName": "backend-node"}} + ) install(monkeypatch, FakeRunner([(["status"], (0, status, ""))])) result = checks.check_tailscale_key_expiry(CheckContext()) assert result.status == OK @@ -427,7 +429,7 @@ def test_tls_ok_with_valid_cert(monkeypatch, have_all_binaries): ), ) result = checks.check_tls_cert( - CheckContext(https_host="kraken.parrot-census.ts.net") + CheckContext(https_host="backend-node.example.ts.net") ) assert result.status == OK assert "Let's Encrypt" in result.detail @@ -441,17 +443,17 @@ def test_tls_uses_sni(monkeypatch, have_all_binaries): [(["s_client"], (0, CERT_PEM, "")), (["x509"], (0, CERT_SUMMARY, ""))] ), ) - checks.check_tls_cert(CheckContext(https_host="kraken.parrot-census.ts.net")) + checks.check_tls_cert(CheckContext(https_host="backend-node.example.ts.net")) argv = runner.argv_containing("s_client")[0] assert "-servername" in argv - assert "kraken.parrot-census.ts.net" in argv + assert "backend-node.example.ts.net" in argv def test_tls_fails_when_no_certificate_served(monkeypatch, have_all_binaries): """What the broken node did: handshake produced no certificate at all.""" install(monkeypatch, FakeRunner([(["s_client"], (1, "", "connect: errno=111"))])) result = checks.check_tls_cert( - CheckContext(https_host="kraken.parrot-census.ts.net") + CheckContext(https_host="backend-node.example.ts.net") ) assert result.status == FAIL assert "cert access denied" in result.remedy @@ -465,7 +467,7 @@ def test_tls_warns_when_expiring(monkeypatch, have_all_binaries): ), ) result = checks.check_tls_cert( - CheckContext(https_host="kraken.parrot-census.ts.net") + CheckContext(https_host="backend-node.example.ts.net") ) assert result.status == WARN diff --git a/extras/chronicle-tray/tests/test_screenpipe_settings.py b/extras/chronicle-tray/tests/test_screenpipe_settings.py index deaf2b9e..136889af 100644 --- a/extras/chronicle-tray/tests/test_screenpipe_settings.py +++ b/extras/chronicle-tray/tests/test_screenpipe_settings.py @@ -75,12 +75,12 @@ def test_save_capture_settings_supports_microphone_only(): def test_audio_forwarding_setting_is_independent_from_capture_unit(tmp_path): path = tmp_path / "config.json" - path.write_text('{"source_id": "rainbow", "forward_audio": "both"}') + path.write_text('{"source_id": "capture-node", "forward_audio": "both"}') _save_forward_audio_setting("output", path) assert _forward_audio_setting(path) == "output" - assert json.loads(path.read_text())["source_id"] == "rainbow" + assert json.loads(path.read_text())["source_id"] == "capture-node" def test_audio_source_modes_round_trip(): diff --git a/extras/chronicle-tray/tests/test_vault_environment.py b/extras/chronicle-tray/tests/test_vault_environment.py index bcda3802..2a442b55 100644 --- a/extras/chronicle-tray/tests/test_vault_environment.py +++ b/extras/chronicle-tray/tests/test_vault_environment.py @@ -133,7 +133,7 @@ def ensure_folder(self, *_args): manager.config = SimpleNamespace( api_key="client-key", backend_url="https://chronicle.example", - device_name="rainbow", + device_name="capture-node", local_vault_dir=str(tmp_path / "Main"), ) manager.syncthing = SyncthingStub() diff --git a/extras/screenpipe-collector/README.md b/extras/screenpipe-collector/README.md index b4c421b4..1a86fc5c 100644 --- a/extras/screenpipe-collector/README.md +++ b/extras/screenpipe-collector/README.md @@ -13,7 +13,7 @@ pixels and OCR are retrieved only for bounded jobs requested by Chronicle. See t ```bash uv run --project extras/screenpipe-collector chronicle-screenpipe pair \ - --backend https://kraken.example \ + --backend https://chronicle.example \ --code PAIRING_CODE ``` diff --git a/extras/screenpipe-collector/tests/test_collector.py b/extras/screenpipe-collector/tests/test_collector.py index 5270e138..861c6688 100644 --- a/extras/screenpipe-collector/tests/test_collector.py +++ b/extras/screenpipe-collector/tests/test_collector.py @@ -163,7 +163,7 @@ def test_collect_audio_checkpoints_sources_excluded_from_forwarding(tmp_path: Pa collector = object.__new__(Collector) collector.config = Config( backend_url="http://chronicle", - source_id="rainbow", + source_id="capture-node", token="token", screenpipe_dir=tmp_path, forward_audio="output", @@ -705,7 +705,7 @@ def post(self, _url, json=None): collector = object.__new__(Collector) collector.config = Config( backend_url="http://backend", - source_id="screenpipe-rainbow", + source_id="screenpipe-capture-node", token="token", screenpipe_dir=tmp_path, ) diff --git a/extras/screenpipe-collector/tests/test_observations.py b/extras/screenpipe-collector/tests/test_observations.py index 32f143c2..6fc6720c 100644 --- a/extras/screenpipe-collector/tests/test_observations.py +++ b/extras/screenpipe-collector/tests/test_observations.py @@ -280,7 +280,7 @@ def test_short_shortlist_is_returned_whole(): def test_tracker_rejects_frames_from_another_display_track(): tracker = ObservationTracker( - capture_source_id="screenpipe-rainbow", track_id="Display 1" + capture_source_id="screenpipe-capture-node", track_id="Display 1" ) tracker.process_rows( [frame(1, 0, "Code", "collector.py", device_name="Display 1")], @@ -304,7 +304,7 @@ def test_tracker_rejects_frames_from_another_display_track(): def test_observation_event_carries_a_typed_display_locator(): tracker = ObservationTracker( - capture_source_id="screenpipe-rainbow", track_id="Display 2" + capture_source_id="screenpipe-capture-node", track_id="Display 2" ) [opened] = tracker.process_rows( @@ -322,7 +322,7 @@ def test_observation_event_carries_a_typed_display_locator(): ) assert opened["locator"] == { - "capture_source_id": "screenpipe-rainbow", + "capture_source_id": "screenpipe-capture-node", "modality": "screen", "track_id": "Display 2", } diff --git a/extras/speaker-recognition/README.md b/extras/speaker-recognition/README.md index de93ff7e..3aa782c1 100644 --- a/extras/speaker-recognition/README.md +++ b/extras/speaker-recognition/README.md @@ -46,7 +46,7 @@ For non-interactive setup: ```bash ./init.sh --hf-token YOUR_TOKEN --compute-mode cpu # Or for HTTPS with specific IP: -./init.sh --hf-token YOUR_TOKEN --compute-mode gpu --enable-https --server-ip 100.83.66.30 +./init.sh --hf-token YOUR_TOKEN --compute-mode gpu --enable-https --server-ip YOUR_SERVER_IP ``` ### 4. SSL Certificates (automatic) @@ -859,7 +859,7 @@ python laptop_client.py list python laptop_client.py remove --speaker-id "john" # Use different service URL -python laptop_client.py --service-url "http://192.168.1.100:8001" identify +python laptop_client.py --service-url "http://YOUR_SERVER_IP:8001" identify ``` ### Laptop Client Features diff --git a/quickstart.md b/quickstart.md index 7140fcc7..0461c7d3 100644 --- a/quickstart.md +++ b/quickstart.md @@ -163,7 +163,7 @@ The wizard will ask questions - here's what to answer: **"Enable HTTPS"**: **Say Yes** (needed for phone connection) **"Server IP for SSL certificate"**: - Run `tailscale ip` in another terminal -- Copy the IP that starts with `100.` (like `100.64.1.5`) +- Copy the IP that starts with `100.` - Paste that IP here *The wizard creates all the configuration files automatically* @@ -180,7 +180,7 @@ The wizard will ask questions - here's what to answer: Before connecting your phone, make sure everything works: -1. Visit: **https://[your-tailscale-ip]** (like `https://100.64.1.5`) +1. Visit: **https://[your-tailscale-ip]** *Your browser will warn about "unsafe certificate" - click "Advanced" → "Proceed anyway"* @@ -216,7 +216,7 @@ Before connecting your phone, make sure everything works: 3. Go to Settings → Backend Configuration 4. Enter Backend URL: `https://[your-tailscale-ip]` - *Use the same IP as your web dashboard - like `https://100.64.1.5`* + *Use the same IP as your web dashboard* 5. Tap "Test Connection" - should show **green checkmark** 6. If connection fails, double-check: diff --git a/scripts/rainbow-testflight-handoff.sh b/scripts/ios-testflight-handoff.sh similarity index 93% rename from scripts/rainbow-testflight-handoff.sh rename to scripts/ios-testflight-handoff.sh index 0270f1dd..9bb2b48b 100755 --- a/scripts/rainbow-testflight-handoff.sh +++ b/scripts/ios-testflight-handoff.sh @@ -46,7 +46,7 @@ fi pushd "${WORKTREE_PATH}/app" >/dev/null if [[ "$(node --version)" != v22.* ]]; then - echo "Rainbow must use Node 22 to match the TestFlight workflow" >&2 + echo "The validation host must use Node 22 to match the TestFlight workflow" >&2 exit 1 fi @@ -67,7 +67,7 @@ swift test --package-path modules/chronicle-duplex-audio/ios popd >/dev/null echo -echo "Rainbow validation passed for ${EXPECTED_SHA}." +echo "Native validation passed for ${EXPECTED_SHA}." echo "Review the generated Expo config and autolinking output, then submit with:" echo echo "gh workflow run ios-testflight.yml --repo ${REPOSITORY} --ref ${BRANCH}" diff --git a/tests/test_remote_control_supervisor.py b/tests/test_remote_control_supervisor.py index 3f259d06..c3e03a06 100644 --- a/tests/test_remote_control_supervisor.py +++ b/tests/test_remote_control_supervisor.py @@ -13,7 +13,7 @@ def test_remote_control_unit_stops_cleanly_when_auth_is_unavailable( monkeypatch.setattr( services, "_claude_rc_command", - lambda: ["/opt/claude", "remote-control", "--name", "Kraken"], + lambda: ["/opt/claude", "remote-control", "--name", "Backend node"], ) monkeypatch.setattr( services.shutil, diff --git a/tests/unit/test_deployment_agent.py b/tests/unit/test_deployment_agent.py index 30849de9..6f480719 100644 --- a/tests/unit/test_deployment_agent.py +++ b/tests/unit/test_deployment_agent.py @@ -1,17 +1,17 @@ import threading from types import SimpleNamespace +from edge.deployments import install from fastapi import FastAPI from fastapi.testclient import TestClient -from edge.deployments import install from tests.unit.test_service_deployments import plan def agent(tmp_path): (tmp_path / "config").mkdir() (tmp_path / "config/config.yml").write_text( - "service_placement:\n node_id: rainbow\n coordinator_url: http://rainbow:8775\n authority: true\n" + "service_placement:\n node_id: capture-node\n coordinator_url: http://capture-node:8775\n authority: true\n" ) app = FastAPI() manager = SimpleNamespace( @@ -32,16 +32,18 @@ def agent(tmp_path): def test_registered_routes_validate_and_reject_excluded_start(tmp_path): client, manager, store = agent(tmp_path) p = plan().model_dump() - p["nodes"] = {"rainbow": "http://rainbow:8775"} + p["nodes"] = {"capture-node": "http://capture-node:8775"} saved = client.put("/deployments", json=p) assert saved.status_code == 200 assert client.get("/deployment-state/llm-services").json()["protocol"] == 1 denied = client.post( - "/deployments/activate", json={"service": "llm-services", "node": "kraken"} + "/deployments/activate", + json={"service": "llm-services", "node": "backend-node"}, ) assert denied.status_code == 409 and "Register node" in denied.json()["detail"] admitted = client.post( - "/deployments/activate", json={"service": "llm-services", "node": "rainbow"} + "/deployments/activate", + json={"service": "llm-services", "node": "capture-node"}, ) assert admitted.status_code == 200 assert client.put("/deployments", json=saved.json()["plan"]).status_code == 409 @@ -71,7 +73,7 @@ def test_reconciliation_stops_only_confirmed_excluded_instance(tmp_path): # The helper import stays local to keep this test fixture independent at collection. from tests.unit.test_service_deployments import stopped - store.configure(plan(owners=("kraken",)), stopped) + store.configure(plan(owners=("backend-node",)), stopped) manager.services.compose_ps_json = lambda _: [{"state": "running"}] called = [] manager._start_operation = lambda name, action, fn: called.append((name, action)) @@ -83,9 +85,8 @@ def test_real_agent_auth_accepts_shared_control_token_for_localhost( tmp_path, monkeypatch ): # Local imports allow manager globals to be patched for this isolated app. - from fastapi import Depends - from edge import service_manager + from fastapi import Depends (tmp_path / "backend").mkdir() (tmp_path / "backend/.env").write_text("SERVICE_PLACEMENT_TOKEN=shared-control\n") diff --git a/tests/unit/test_deployment_gateway.py b/tests/unit/test_deployment_gateway.py index de8b6312..e08c6c6e 100644 --- a/tests/unit/test_deployment_gateway.py +++ b/tests/unit/test_deployment_gateway.py @@ -2,11 +2,11 @@ import httpx import pytest +from edge.deployments import Gateway from fastapi import FastAPI from fastapi.testclient import TestClient - -from edge.deployments import Gateway from service_deployments import Plan + from tests.unit.test_service_deployments import plan @@ -49,26 +49,31 @@ def upstream(request): (request.method, request.url.host, request.url.path, request.content) ) if request.url.path == "/health": - if request.url.host == "kraken" and not primary_up: + if request.url.host == "backend-node" and not primary_up: return httpx.Response(503, json={"status": "loading"}) return httpx.Response(200, json={"model": "same-model"}) return httpx.Response( 200, stream=Stream(), headers={"content-type": "text/event-stream"} ) - client = app_for(plan("ha", ("kraken", "rainbow")), upstream) + client = app_for(plan("ha", ("backend-node", "capture-node")), upstream) r = client.post( "/proxy/chat/completions", content=b'{"stream":true}', headers={"Authorization": "Bearer private"}, ) - assert r.status_code == 200 and r.headers["x-chronicle-instance"] == "rainbow" + assert r.status_code == 200 and r.headers["x-chronicle-instance"] == "capture-node" assert r.text == "data: first\n\ndata: [DONE]\n\n" - assert seen[-1] == ("POST", "rainbow", "/v1/chat/completions", b'{"stream":true}') + assert seen[-1] == ( + "POST", + "capture-node", + "/v1/chat/completions", + b'{"stream":true}', + ) primary_up = True assert ( client.post("/proxy/chat/completions", json={}).headers["x-chronicle-instance"] - == "kraken" + == "backend-node" ) @@ -81,17 +86,17 @@ def upstream(request): posts.append(request.url.host) raise httpx.ReadTimeout("ambiguous response timeout") - r = app_for(plan("ha", ("kraken", "rainbow")), upstream).post( + r = app_for(plan("ha", ("backend-node", "capture-node")), upstream).post( "/proxy/chat/completions", json={"prompt": "one"} ) - assert r.status_code == 502 and posts == ["kraken"] + assert r.status_code == 502 and posts == ["backend-node"] def test_wrong_model_and_all_failed_return_unavailable(): def upstream(request): return httpx.Response(200, json={"model": "wrong-model"}) - r = app_for(plan("ha", ("kraken", "rainbow")), upstream).post( + r = app_for(plan("ha", ("backend-node", "capture-node")), upstream).post( "/proxy/chat/completions", json={} ) assert r.status_code == 503 @@ -109,7 +114,7 @@ def upstream(request): app_for(plan(), upstream).post("/proxy/chat/completions", json={}).status_code == 503 ) - assert hosts == ["rainbow"] + assert hosts == ["capture-node"] def test_failover_over_real_http_connections(): @@ -164,7 +169,7 @@ def log_message(self, *args): threading.Thread(target=server.serve_forever, daemon=True).start() servers.append(server) try: - p = plan("ha", ("kraken", "rainbow")).model_dump() + p = plan("ha", ("backend-node", "capture-node")).model_dump() for instance, server in zip( p["deployments"]["llm-services"]["instances"], servers ): @@ -186,9 +191,9 @@ async def chat(request: Request): with TestClient(app) as client: for primary_up, expected in [ - (True, "kraken"), - (False, "rainbow"), - (True, "kraken"), + (True, "backend-node"), + (False, "capture-node"), + (True, "backend-node"), ]: available[0] = primary_up response = client.post("/chat", json={"stream": True}) diff --git a/tests/unit/test_service_cli.py b/tests/unit/test_service_cli.py index 0a8ded75..166a7110 100644 --- a/tests/unit/test_service_cli.py +++ b/tests/unit/test_service_cli.py @@ -7,15 +7,14 @@ from pathlib import Path from types import SimpleNamespace -import pytest -from fastapi.testclient import TestClient - import deployment_guard +import pytest import service_cli as cli import service_operations as operations import services import status from edge import service_manager as manager +from fastapi.testclient import TestClient @pytest.fixture @@ -136,7 +135,7 @@ def collect(names): ["restart"], ["start", "oops"], ["start", "tts", "--all"], - ["start", "tts", "--direct", "--node", "rainbow"], + ["start", "tts", "--direct", "--node", "capture-node"], ["start", "tts", "--direct", "--no-wait"], ["start", "tts", "--timeout", "0"], ["start", "tts", "--build", "--use-prebuilt", "v1"], @@ -238,12 +237,14 @@ def request(method, url, **kw): return SimpleNamespace( ok=True, json=lambda: { - "plan": {"nodes": {"rainbow": "http://rainbow.example.ts.net:8775"}} + "plan": { + "nodes": {"capture-node": "http://capture-node.example.ts.net:8775"} + } }, ) monkeypatch.setattr(cli.requests, "request", request) - assert cli.target_url("rainbow") == "http://rainbow.example.ts.net:8775" + assert cli.target_url("capture-node") == "http://capture-node.example.ts.net:8775" assert calls[0][2]["headers"] == {"Authorization": "Bearer secret-token"} with pytest.raises(ValueError, match="Unknown registered node"): cli.target_url("missing") diff --git a/tests/unit/test_service_deployments.py b/tests/unit/test_service_deployments.py index e22aa05b..ee9adc10 100644 --- a/tests/unit/test_service_deployments.py +++ b/tests/unit/test_service_deployments.py @@ -3,14 +3,16 @@ import pytest from pydantic import ValidationError - from service_deployments import DeploymentStore, PlacementError, Plan -def plan(mode="single", owners=("rainbow",)): +def plan(mode="single", owners=("capture-node",)): return Plan.model_validate( { - "nodes": {"kraken": "http://kraken:8775", "rainbow": "http://rainbow:8775"}, + "nodes": { + "backend-node": "http://backend-node:8775", + "capture-node": "http://capture-node:8775", + }, "deployments": { "llm-services": { "mode": mode, @@ -43,13 +45,13 @@ def test_single_owner_denies_foreign_node_and_duplicate_process(tmp_path): store = DeploymentStore(tmp_path / "plan.db") store.configure(plan(), stopped) with pytest.raises(PlacementError, match="excluded"): - store.acquire("llm-services", "kraken", stopped) + store.acquire("llm-services", "backend-node", stopped) def unexpected(node, *args): - return {**stopped(), "running": node == "kraken"} + return {**stopped(), "running": node == "backend-node"} with pytest.raises(PlacementError, match="Unexpected"): - store.acquire("llm-services", "rainbow", unexpected) + store.acquire("llm-services", "capture-node", unexpected) def test_concurrent_activations_and_plan_edit_cannot_race(tmp_path): @@ -58,7 +60,7 @@ def test_concurrent_activations_and_plan_edit_cannot_race(tmp_path): def start(_): try: - return store.acquire("llm-services", "rainbow", stopped) + return store.acquire("llm-services", "capture-node", stopped) except PlacementError: return None @@ -76,10 +78,12 @@ def start(_): def test_move_requires_positive_stop_proof_and_revision(tmp_path): store = DeploymentStore(tmp_path / "plan.db") original = store.configure(plan(), stopped) - new = plan(owners=("kraken",)).model_copy(update={"revision": original.revision}) + new = plan(owners=("backend-node",)).model_copy( + update={"revision": original.revision} + ) with pytest.raises(PlacementError, match="must be stopped"): store.configure( - new, lambda node, *_: {**stopped(), "running": node == "rainbow"} + new, lambda node, *_: {**stopped(), "running": node == "capture-node"} ) def offline(*_): @@ -95,9 +99,9 @@ def offline(*_): def test_ha_allows_only_declared_replicas(tmp_path): store = DeploymentStore(tmp_path / "plan.db") - store.configure(plan("ha", ("kraken", "rainbow")), stopped) + store.configure(plan("ha", ("backend-node", "capture-node")), stopped) token = store.acquire( - "llm-services", "rainbow", lambda *_: {**stopped(), "running": True} + "llm-services", "capture-node", lambda *_: {**stopped(), "running": True} ) assert token store.release(token) @@ -106,7 +110,7 @@ def test_ha_allows_only_declared_replicas(tmp_path): def test_speaker_ha_rejects_unversioned_mutable_catalogs(): - data = plan("ha", ("kraken", "rainbow")).model_dump() + data = plan("ha", ("backend-node", "capture-node")).model_dump() deployment = data["deployments"].pop("llm-services") data["deployments"]["speaker-recognition"] = deployment deployment["state"] = "speaker_catalog" @@ -123,7 +127,7 @@ def test_compose_entry_point_does_not_execute_when_authority_is_down( (tmp_path / "config").mkdir() (tmp_path / "config/config.yml").write_text( - "service_placement:\n node_id: rainbow\n coordinator_url: http://authority:8775\n" + "service_placement:\n node_id: capture-node\n coordinator_url: http://authority:8775\n" ) monkeypatch.setattr(services, "__file__", str(tmp_path / "services.py")) @@ -146,7 +150,7 @@ def test_cli_recreate_denied_before_stopping(monkeypatch, tmp_path): (tmp_path / "config").mkdir() (tmp_path / "config/config.yml").write_text( - "service_placement:\n node_id: kraken\n coordinator_url: http://authority:8775\n" + "service_placement:\n node_id: backend-node\n coordinator_url: http://authority:8775\n" ) monkeypatch.setattr(services, "__file__", str(tmp_path / "services.py")) monkeypatch.setattr(services, "check_service_enabled", lambda *_: True) @@ -178,14 +182,14 @@ def test_first_placement_cannot_race_unconfigured_activation(tmp_path): store = DeploymentStore(tmp_path / "plan.db") empty = Plan(nodes=plan().nodes) saved = store.configure(empty, stopped) - token = store.acquire("llm-services", "kraken", stopped) + token = store.acquire("llm-services", "backend-node", stopped) proposed = plan().model_copy(update={"revision": saved.revision}) with pytest.raises(PlacementError, match="in progress"): store.configure(proposed, stopped) store.release(token) with pytest.raises(PlacementError, match="must be stopped"): store.configure( - proposed, lambda node, *_: {**stopped(), "running": node == "kraken"} + proposed, lambda node, *_: {**stopped(), "running": node == "backend-node"} ) @@ -193,14 +197,17 @@ def test_stale_reconciliation_cannot_stop_new_owner(tmp_path): store = DeploymentStore(tmp_path / "plan.db") old = store.configure(plan(), stopped) store.configure( - plan(owners=("kraken",)).model_copy(update={"revision": old.revision}), stopped + plan(owners=("backend-node",)).model_copy(update={"revision": old.revision}), + stopped, ) with pytest.raises(PlacementError, match="no longer authorized"): - store.acquire("llm-services", "kraken", stopped, stop_revision=old.revision) + store.acquire( + "llm-services", "backend-node", stopped, stop_revision=old.revision + ) def test_health_only_ha_identity_is_rejected(): - p = plan("ha", ("kraken", "rainbow")).model_dump() + p = plan("ha", ("backend-node", "capture-node")).model_dump() for i in p["deployments"]["llm-services"]["instances"]: i["endpoints"]["chat"]["identity"] = {"status": "ok"} with pytest.raises(ValidationError, match="model identity"): @@ -216,7 +223,7 @@ def test_boot_waits_for_agent_readiness_before_compose(monkeypatch, tmp_path): monkeypatch.setattr( services, "load_config_yml", - lambda: {"service_placement": {"node_id": "rainbow"}}, + lambda: {"service_placement": {"node_id": "capture-node"}}, ) monkeypatch.setattr(services, "_start_service_manager", lambda: None) monkeypatch.setattr(services, "ensure_docker_network", lambda: True) diff --git a/tests/unit/test_service_display.py b/tests/unit/test_service_display.py index 8b6db7b5..1dc19ed2 100644 --- a/tests/unit/test_service_display.py +++ b/tests/unit/test_service_display.py @@ -142,7 +142,7 @@ def test_llm_health_uses_each_endpoints_configured_bind_host(monkeypatch, tmp_pa (llm_dir / ".env").write_text( "LLM_PORT=8083\n" "EMBED_PORT=8082\n" - "LLM_BIND_HOST=100.83.66.30\n" + "LLM_BIND_HOST=100.64.0.10\n" "EMBED_BIND_HOST=127.0.0.1\n" ) requested = [] @@ -155,7 +155,7 @@ def get(url, timeout): assert services.check_service_health("llm-services") == ("healthy", "") assert requested == [ - ("http://100.83.66.30:8083/health", 2), + ("http://100.64.0.10:8083/health", 2), ("http://127.0.0.1:8082/health", 2), ] diff --git a/tests/unit/test_service_lifecycle.py b/tests/unit/test_service_lifecycle.py index a74cb4da..6f2049a3 100644 --- a/tests/unit/test_service_lifecycle.py +++ b/tests/unit/test_service_lifecycle.py @@ -7,15 +7,15 @@ from pathlib import Path from types import SimpleNamespace +import deployment_guard import pytest import requests -import yaml - -import deployment_guard import service_cli import services import status +import yaml from service_deployments import PlacementError + from tests.unit.test_service_deployments import plan @@ -127,7 +127,7 @@ def deny(*a, **k): def configure_placement(root, monkeypatch, snapshot): config = { "service_placement": { - "node_id": "kraken", + "node_id": "backend-node", "coordinator_url": "http://authority:8775", } } @@ -155,7 +155,9 @@ def get(url, **kwargs): @pytest.mark.parametrize("action", ["start", "restart"]) -@pytest.mark.parametrize("owners", [("rainbow",), ("kraken",), ("rainbow", "kraken")]) +@pytest.mark.parametrize( + "owners", [("capture-node",), ("backend-node",), ("capture-node", "backend-node")] +) def test_bulk_activation_selects_local_owner_and_ha_members( lifecycle, monkeypatch, action, owners ): @@ -168,7 +170,9 @@ def test_bulk_activation_selects_local_owner_and_ha_members( lambda name, *a, **k: invoked.append(name) or True, ) assert run_cli(monkeypatch, action, "--all") == 0 - assert set(invoked) == ({"llm-services", "tts"} if "kraken" in owners else {"tts"}) + assert set(invoked) == ( + {"llm-services", "tts"} if "backend-node" in owners else {"tts"} + ) assert requests_made.count("http://authority:8775/deployments") == 1 @@ -179,7 +183,7 @@ def test_bulk_activation_fails_closed(lifecycle, monkeypatch, action, fault): if fault == "malformed": snapshot = {"deployments": []} elif fault == "unregistered": - snapshot["nodes"].pop("kraken") + snapshot["nodes"].pop("backend-node") configure_placement(lifecycle, monkeypatch, snapshot) if fault == "offline": original_get = deployment_guard.requests.get @@ -215,7 +219,9 @@ def test_stop_all_does_not_require_authority_or_filter_excluded_services( def test_bulk_selection_is_authenticated_and_does_not_replace_admission( lifecycle, monkeypatch ): - configure_placement(lifecycle, monkeypatch, plan(owners=("kraken",)).model_dump()) + configure_placement( + lifecycle, monkeypatch, plan(owners=("backend-node",)).model_dump() + ) monkeypatch.setenv("SERVICE_PLACEMENT_TOKEN", "test-control-token") original_get = deployment_guard.requests.get order = []