Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

KR-1 ST1: Kora runtime fork + baseline recon#1

Merged
rafe-walker merged 1 commit into
mainfrom
feat/kora-KR1-fork-recon
May 20, 2026
Merged

KR-1 ST1: Kora runtime fork + baseline recon#1
rafe-walker merged 1 commit into
mainfrom
feat/kora-KR1-fork-recon

Conversation

@rafe-walker

Copy link
Copy Markdown
Owner

Bucket

KR-1 sub-task 1 — first bucket on the CC#3 Python runtime lane. See kora_docs/17_cc_bucket_prompts/KR-1_kora_runtime_fork_and_identity.md in the PM workspace.

What landed

  • New file: docs/kora-runtime/KR-1-baseline-recon.md (340 LOC) — Python toolchain, identity locations, naming hits, ~/.hermes paths, test+typecheck baseline.

Baseline

  • Python 3.11.15, 1,781 .py files
  • Tests: 24,471 passing (xdist parallel)
  • 100 xdist isolation flakes (aiohttp+parallelization noise; not real code issues — running api_server health tests serially passes cleanly)
  • ty diagnostics: 7,341 pre-existing
  • Identity locations confirmed:
    • agent/prompt_builder.py:134 (DEFAULT_AGENT_IDENTITY)
    • agent/prompt_builder.py:1314 (load_soul_md)
    • hermes_constants.py, hermes_bootstrap.py, hermes_state.py, hermes_logging.py, hermes_time.py — naming hits
    • hermes_cli/ package directory
    • hermes shell shim at repo root
    • ~/.hermes path references throughout

ST4 binding requirement update (per Joshua 2026-05-20)

Kora runtime MUST expose BOTH kora mcp serve AND the HTTP API server so both PMs + other authorized agents can drive Kora directly. The xdist isolation flakes are good news — running the api_server health tests serially passes cleanly, so the API surface is healthy.

Next

ST2 (identity swap) dispatches on PM merge signal.

Recon-only commit. No code modifications.

Captures the read-only baseline of rafe-walker/kora @ HEAD 5e74355
before any KR-1 modification:

- Environment: Python 3.11.15 via uv 0.11.15; setuptools build backend;
  pytest+ty+ruff dev tooling. Curated extras list explained (excludes
  matrix due to python-olm libolm build failure).
- Repo size: 207MB, 1781 .py files, 459 files with literal "Hermes",
  527 files referencing ~/.hermes / HERMES_HOME.
- Test collection: 24,698 tests, 0 collection errors after extras.
- Test run baseline: 24,471 passed / 100 failed / 129 skipped in 229.80s.
  The 100 failures are xdist parallelism artifacts (sample
  TestHealthEndpoint passes serially) — pre-existing, not introduced.
- Typecheck baseline: 7,341 ty diagnostics + fatal-error warning
  (exit 0; pre-existing).
- Identity locations confirmed at current HEAD:
  agent/prompt_builder.py L134-135 (DEFAULT_AGENT_IDENTITY literal),
  L1313 (load_soul_md), 10 total "Hermes" hits in prompt_builder
  (drift from ref doc's "8" by +2).
- Identifies ST3 rename targets: hermes_constants.py, hermes_bootstrap.py,
  hermes_state.py, hermes_logging.py, hermes_time.py, hermes_cli/,
  the hermes shell shim, plus 527 ~/.hermes path callers.
- STOP-gate clear: no abnormal test-count drop vs ref doc snapshot.

Tooling choice (uv) records the per-Joshua-directive call: KR-2/3/4
will follow the same uv-based bootstrap path.

KR-1 ST4 binding from Joshua 2026-05-20 captured in §3 and §6: ST4
operational verification must include both `kora mcp serve` AND the
HTTP API server (gateway/platforms/api_server.py adapter) starting
cleanly. PMs need programmatic access to drive Kora directly.

Bucket: KR-1 sub-task 1 / 4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rafe-walker rafe-walker merged commit 12e373c into main May 20, 2026
rafe-walker added a commit that referenced this pull request May 22, 2026
…omy (#99)

gateway/platforms/api_server.py module docstring extended with Class C explanation + adding-new-identifier guidance (default to Kora-prefixed unless external compat genuinely required). Cites original CC#3 commit 64eaaae where the 3-class A/B/C taxonomy was articulated. Closes task #165. Companion kora-docs PR #1 adds kora_docs/00_canonical_current_state/identity_literal_taxonomy.md.

CC#1 caught + recovered from a branch-state slip mid-bucket (first docs commit landed on local main; cherry-picked onto feat branch, force-pushed, reset local main). Memory entry written. Discipline note: cwd resets between Bash calls break assumed in-flight branch context.
rafe-walker added a commit that referenced this pull request May 24, 2026
…t + tool descriptions (#158)

Lock R3-4 item #1 (BASELINE-SETTING). cache_control: ephemeral on (a) kwargs['system'] via _wrap_system_as_cacheable + (b) kwargs['tools'] last entry via _wrap_tools_as_cacheable. Both built once outside iteration loop so kwargs are byte-identical per roundtrip → cache reads engage.

Cost-ladder accounting threaded through ResponseResult + _project_final_response + SlackDM reasoning_meta (3 branches) + _record_inference_to_cost_ladder → CanonicalUsage(input, output, cache_write_tokens, cache_read_tokens) → existing PricingEntry.cache_*_cost_per_million applies ($0.50 read / $6.25 write per MTok Opus 4.7). _append_outbound_log_entry persists cache totals to slack DM JSONL for reasoning-panel visibility. Pure-cache-read calls still bill (4-bucket early-return guard).

16 new tests + 1 pre-existing updated. 483/483 reasoning+handlers+listeners green.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant