This repository was archived by the owner on May 26, 2026. It is now read-only.
KR-1 ST4: Operational verification + console-script finalize (closes KR-1)#4
Merged
Merged
Conversation
…ding doc (closes KR-1)
The closing pass on KR-1. After ST3 renamed the modules + paths, ST4
verifies the renamed binary actually runs as Kora across every surface
the operator and the PM-driven MCP/HTTP-API callers touch — and ships
the operator quickstart + ST4 verification report that closes the
KR-1 bucket.
Scope: 10 files changed, +749 / −57. Surgical CLI-surface edits +
22 ST4 smoke tests + 2 ST3-extension tests + 2 docs.
Version surface (per bucket spec):
- kora_cli/__init__.py:
__version__ = "0.1.0" (Kora's own version stream)
__release_date__ = "2026.5.20"
__hermes_inherited_version__ = "0.14.0" (forked-from)
__hermes_inherited_release_date__ = "2026.5.16"
__hermes_fork_commit__ = "5e743559e0157df42e0f640cd06d736e898370d0"
__hermes_fork_commit_short__ = "5e743559e"
- pyproject.toml: version = "0.1.0"
- cmd_version output now:
"Kora 0.1.0 (Hermes-derived runtime; fork of NousResearch/hermes-agent@5e743559e)"
per the bucket-mandated string. Released line + Project + Python +
OpenAI SDK + update-status all preserved.
CLI rebrand (cosmetic but operator-visible):
- kora_cli/_parser.py: ArgumentParser(prog="kora") + Kora description.
- kora_cli/_parser.py: chat subcommand description "with Kora".
- kora_cli/main.py: setup description "Configure the Kora runtime…".
- kora_cli/main.py: mcp serve help "Run Kora as an MCP server…".
Generic HERMES_* → KORA_* env var BC sync (closes ST3 gap):
- kora_bootstrap.py: init_kora_home_env() widened from HERMES_HOME-only
to scan ALL HERMES_* / KORA_* prefix pairs and bidirectionally mirror.
Single warn-once stderr message listing detected legacy variables.
Idempotent. Catches HERMES_ACCEPT_HOOKS, HERMES_LOG_LEVEL, etc. that
ST3 left untouched.
Tests:
- tests/test_kora_st4_smokes.py (NEW, 21 tests in 7 classes):
* TestKoraVersion — 4 assertions on the --version output shape +
fork-commit short SHA + inherited Hermes version embedding.
* TestKoraHelpTopLevel — 3 assertions: prog="kora", description,
required subcommands surface.
* TestKoraSubcommandHelp — 4 assertions: chat/setup/mcp/gateway
--help all rebranded.
* TestPMDrivenSurfacesStartClean — 3 assertions on the Joshua
binding (memory: reference_kora_must_accept_mcp_and_api_commands.md
2026-05-20). `kora mcp serve` exits 0 on stdin EOF; HTTP API server
adapter (APIServerAdapter) imports + check_api_server_requirements()
returns True.
* TestHermesBCWrapper — 3 assertions: ./hermes runs kora underneath
+ emits deprecation warning + KORA_HERMES_DEPRECATION_QUIET=1
suppresses.
* TestMigrationSmokeViaCLI — 3 assertions: `kora migrate-hermes-home
--check/--symlink/--copy` work via the CLI subparser (not just
the module main()).
* TestKoraIdentityVisibleAtRuntime — 1 assertion: "You are Kora."
survives the subprocess boundary (ST2 reaffirmation).
- tests/test_kora_paths_kr1_st3.py: +2 tests for the widened generic
HERMES_* sync.
All ST4+widened-ST3 tests pass serially in 9.06s + 0.81s.
Docs:
- docs/kora-runtime/KR-1-quickstart.md (NEW, ~80 lines): operator
onboarding — install via uv, first-run sequence, Joshua-specific
notes (memory backend still flat → KR-2, both PM surfaces working,
identity sources of truth, Role Charter advertised but not yet read),
surfaces verified at KR-1 ST4, operator pitfalls (PyPI namesquatting
warning, xdist flake guidance, HERMES_* env BC, macOS Keychain
issue), and KR-2…KR-7 forward-looking table.
- docs/kora-runtime/KR-1-st4-verification-report.md (NEW, ~180
lines): full operational smoke results table, ST4-vs-ST3-vs-ST2
-vs-ST1 deltas, files-modified inventory, spec-discipline summary,
STOP-gate evaluation, KR-1 closing scoreboard, risks carried into
KR-2.
Verification:
- 21 ST4 smokes pass serially in 9.06s.
- 24 ST3 tests (incl. 2 new) pass serially in 0.81s.
- Full suite (xdist): 24,471 passed / 155 failed / 129 skipped in
235.26s. Passed-count is BACK TO ST1 baseline (24,471) — the
apparent ST3 regression of −52 was fully xdist scheduling noise +
stale .pytest_cache. The +4 failed delta over ST3 is within typical
xdist jitter on this codebase.
- ty check: 7,341 diagnostics, identical to all prior baselines.
Zero new diagnostics from ST4.
Joshua binding closed: tests/test_kora_st4_smokes.py::
TestPMDrivenSurfacesStartClean enforces that both `kora mcp serve`
and the HTTP API server adapter start cleanly. Both PMs can drive
Kora directly.
STOP-gate clear. KR-1 closes. KR-2 (IsoKron memory provider —
kora_docs/17_cc_bucket_prompts/KR-2_isokron_memory_provider.md)
dispatches next.
Bucket: KR-1 sub-task 4 / 4. Full verification report at
docs/kora-runtime/KR-1-st4-verification-report.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
rafe-walker
added a commit
that referenced
this pull request
May 24, 2026
…n pip POC + structural FATAL flag (#204) Two deliverables closing #203's §6.4 gap (no pip-install path validated) + #200's deferred follow-up (FATAL contract was documentation-only). Per Joshua's amended feedback-local-first-upstream-after: structure only, no PyPI publish, no upstream PR. Deliverable A — Pip-packaging foundation plugins/marvin/ restructured to relocatable src/ layout: plugins/marvin/ ├── pyproject.toml # NEW — setuptools build + hermes_agent.plugins entry point ├── README.md # NEW — operator-facing install doc ├── plugin.yaml # KEPT — Hermes bundled-plugin discovery ├── __init__.py # REPLACED — sys.path-adjusting compat shim └── src/marvin/ ├── __init__.py # canonical module (relocated) └── data/ ├── MARVIN.md # relocated └── marvin_system_prompt.md pyproject.toml declares "[project.entry-points.hermes_agent.plugins] marvin = marvin:register" — the exact entry-point group Hermes's _scan_entry_points already reads. Package_data includes the markdown files so the wheel ships relocatable identity assets. The in-tree compat shim at plugins/marvin/__init__.py prepends plugins/marvin/src to sys.path + re-exports register/marvin_identity_provider from the canonical module. Existing 11 multi-tenant tests from #203 continue to pass with only one updated assertion (data files moved to src/marvin/data/). Live dry-run install validated this session: $ uv build --wheel → marvin_runtime-0.1.0a1-py3-none-any.whl $ pip install <wheel> into fresh /tmp/marvin-dry-install venv $ importlib.metadata.entry_points() discovers ('marvin', 'marvin:register') $ marvin.__file__ = /tmp/.../site-packages/marvin/__init__.py (NOT in-tree) $ provider call → IdentitySpec(agent_name='Marvin', soul_chars=1306, system_chars=1486) $ register(stub_ctx) → wires identity provider via stub PluginContext ✓ CI-runnable regression guard: tests/plugins/test_marvin_pip_install_dry_run.py — 6 tests covering pyproject structure pins, wheel content pins, entry-point declaration pin, METADATA Requires-Python pin. ~0.5s per run via uv build (or python -m build if uv unavailable). Companion kora-docs deliverables (separate PR): - kora_docs/14_research/kora_pip_packaging_2026-05-24/AUDIT.md — concrete shopping list for the future 4-package Kora restructure (kora-runtime + kora-cli + kora-cockpit + kora-promote-loops). 7-9 CC-days estimate across 4 sequential phases. 4 open questions for operator (Hermes pip-installability, IsoKron client packaging, schema migrations, versioning cadence). - kora_docs/14_research/plugin_identity_option_c_2026-05-24/MARVIN_DEMO_TRANSCRIPT.md §7 addendum — gap §6.4 closed; full wheel build + dry-run install transcript captured. Deliverable B — Structural FATAL flag Replaces #200's documentation-driven FATAL contract with structural enforcement: agent/background_daemon_registry.py: - New field BackgroundDaemonEntry.fatal_on_startup_failure: bool = False - Field docstring documents the semantics + the looked-up-by-name path for the Path B thin-shim shape kora_cli/plugins.py: - PluginContext.register_background_daemon accepts the new fatal_on_startup_failure kwarg + threads it into the BackgroundDaemonEntry construction kora_cli/daemon.py: - New method DaemonCoordinator._is_startup_failure_fatal(listener_name): - Looks up the listener's BackgroundDaemonEntry by name - Returns entry.fatal_on_startup_failure if found - Returns True if not found (preserves pre-flag behavior for Kora-only HTTP service mounts: web/mcp/webhooks) - Returns True on lookup failure (defensive — never silently degrade on infrastructure error) - run() loop checks the flag at the listener-startup-raise site: - True → abort daemon boot (existing behavior) - False → log + continue starting subsequent listeners (NEW: lenient default for non-critical daemons whose own try/except didn't catch an unexpected exception) kora_cli/listeners/reasoning_engine_listener.py: - _hermes_entry now passes fatal_on_startup_failure=True explicitly - Module docstring updated to reflect structural-not-documentation contract Tests: 18 in tests/kora_cli/test_daemon_fatal_on_startup_failure.py covering: - Dataclass field defaults + frozen invariant - PluginContext kwarg passthrough - Lookup behavior (fatal entry / non-fatal entry / no entry / unknown name) - End-to-end coordinator behavior (fatal raises abort; non-fatal raises log + continue past) - Production pin: reasoning_engine has fatal=True; 7 phase-1/2/3 listeners (snapshot/heartbeat_probes/slack_client/purelymail_client/alert_notifier/cost_telemetry/mcp_consumption) default to fatal=False Per the [[feedback-local-first-upstream-after]] amendment: this Hermes extension lives in the fork only this dispatch. When operator approves the next upstream-PR batch, this becomes upstream candidate #4 (joining the 3 already-deferred branches from #196). Tests: 473/473 focused regression set green (Marvin tests + pip dry-run tests + FATAL flag tests + listener tests + identity tests + plugin tests). Co-authored-by: CC#3 Kora Runtime <kora-pm@stormhavenenterprises.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bucket: KR-1 sub-task 4 / 4. CLOSES KR-1. Branch: feat/kora-KR1-operational-verification @ e27b8c2. 10 files / +749 -57. CLI rebrand finalized (prog=kora, Kora-branded descriptions), version surface emits 'Kora 0.1.0 (Hermes-derived runtime; fork of NousResearch/hermes-agent@5e743559e)' per bucket spec, generic HERMES_* ↔ KORA_* env var BC at bootstrap (closes ST3 gap), kora_cli/init.py carries 4 fork-provenance constants. 21 new ST4 smokes + 2 ST3-extension tests — all pass serially in 9.06s + 0.81s. JOSHUA BINDING CLOSED (memory: reference_kora_must_accept_mcp_and_api_commands.md): TestPMDrivenSurfacesStartClean verifies both kora mcp serve AND HTTP API server adapter start clean. Operator quickstart at docs/kora-runtime/KR-1-quickstart.md, verification report at docs/kora-runtime/KR-1-st4-verification-report.md. Full suite delta: 24,471 passed / 155 failed (+4 xdist jitter vs ST3) / 129 skipped — passed-count BACK TO ST1 baseline (ST3's apparent -52 regression was fully xdist scheduling noise). ty: 7,341 diagnostics, identical to baseline (0 new). STOP-gate clear. KR-2 (IsoKron memory provider) dispatches next. 🤖 Generated with Claude Code