Skip to content

chore: promote dev to master (controller brick fix, installer sudo fix, perf cleanups, rescue runbook) - #766

Merged
jaylfc merged 7 commits into
masterfrom
dev
Jun 11, 2026
Merged

chore: promote dev to master (controller brick fix, installer sudo fix, perf cleanups, rescue runbook)#766
jaylfc merged 7 commits into
masterfrom
dev

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Promotes to master:

jaylfc added 7 commits June 10, 2026 21:57
… httpx client (#660) (#752)

- Evict per-request lock from _approve_locks after terminal decision so the dict does not grow unbounded over the process lifetime (try/finally pop in approve_auth_request handler).
- Add idx_auth_requests_status and idx_auth_requests_identity indexes to auth_requests SCHEMA so list_pending and count_pending_for queries use indexed scans.
- Replace five inline httpx.AsyncClient context managers in user_memory routes with the shared request.app.state.http_client; pass timeout per-call. Update four affected tests to inject mock via app.state.http_client instead of patching the constructor.
…in-server startup failure (#763)

* fix(knowledge): apply user_id migration to existing DBs via guarded _post_init

Removes idx_ki_user_id from KNOWLEDGE_SCHEMA (it references user_id which old
DBs lack, crashing executescript before migrations can run) and drops the
MIGRATIONS list (baseline-at-latest silently skips retrofit migrations on the
databases that need them).

Replaces both with a guarded _migration_v1_add_user_id coroutine that runs at
the top of _post_init: PRAGMA table_info check, ALTER TABLE ADD COLUMN only
when user_id is absent, then CREATE INDEX IF NOT EXISTS. Pattern copied from
agent_registry_store._migration_v1_add_status. Self-heals already-bricked
installs on their next update -- no manual DB surgery needed.

Adds loud docstring warnings to db_migrations.py and BaseStore documenting
the SCHEMA-runs-first and baseline-at-latest footguns so the same mistake is
not introduced again.

Tests: init against a simulated old-shape DB asserts column+index exist after
init and a second init is a no-op; fresh-DB path also verified.

Fixes #755

* fix(startup): exit non-zero when main server fails to start in dual-port mode

Replaces the bare asyncio.gather in _serve_dual_port with FIRST_COMPLETED
semantics via a new _serve_until_first_exit helper: when either server's
serve() returns, the other is cancelled and awaited; any exception from the
completed task is re-raised; returns bool(main_server.started).

If the main server never reached started (lifespan raised on startup),
_serve_dual_port logs a clear error and raises SystemExit(3) so systemd
surfaces the failure and Restart=always triggers instead of leaving a
half-alive process listening only on the proxy port.

Tests: stub server objects (no real sockets) cover main-fails-to-start
returns False, proxy-exits-first-with-started-main returns True, both-exit
returns True, and serve-exception propagates.

Fixes #756
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jaylfc, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 23 minutes and 33 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7346e5eb-9992-4857-80ac-e23629f7bbe0

📥 Commits

Reviewing files that changed from the base of the PR and between 93f395e and fc9bce8.

📒 Files selected for processing (14)
  • docs/STATUS.md
  • docs/runbooks/controller-rescue.md
  • scripts/install-server.sh
  • tests/test_auth_requests.py
  • tests/test_dual_port_helper.py
  • tests/test_knowledge_migration.py
  • tests/test_user_memory.py
  • tinyagentos/__main__.py
  • tinyagentos/auth_requests_store.py
  • tinyagentos/base_store.py
  • tinyagentos/db_migrations.py
  • tinyagentos/knowledge_store.py
  • tinyagentos/routes/agent_auth_requests.py
  • tinyagentos/routes/user_memory.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

👋 Thanks for the PR! This one targets master, which is our
stable branch (it's what live installs track). Please retarget it to
dev — click Edit next to the PR title and change the base
branch dropdown from master to dev. Your commits and any review
carry over, nothing is lost.

See CONTRIBUTING.md for the branch model.

@jaylfc
jaylfc merged commit 3fe1c49 into master Jun 11, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in TinyAgentOS Roadmap Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

1 participant