Skip to content

Land high-value improvements tranche 1 (M0–M3): architecture gate, turn integrity, security profiles, credential vault, retry identity, occurrence identity#237

Open
hwuiwon wants to merge 6 commits into
mainfrom
high-value-improvements-m0-m3
Open

Conversation

@hwuiwon

@hwuiwon hwuiwon commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Implements the first tranche of the high-value improvements program
(docs/engineering-discipline/plans/2026-07-22-moa-high-value-improvements.md):
seven P0 tasks across M0–M3, each with full verification and a
fail-then-restore mutation ledger.

Completed tasks

Task Outcome
0.1 Architecture gate Checker un-wedged from a stale path, now self-validating (every configured path checked pre-scan); honest ratchets (51 pkgs / 48 members / moa-core 43+46 / worker-state 344) recorded in ADR 0003; dual-control + tenant-purge SQL moved into repositories; raw OrchestratorCtx::current() eliminated via injected TurnEventAppender
0.2 Baseline repair Both standing failures root-caused and fixed: stale journal-role fixture rewritten to the in-prompt <response_schema> contract; contact-group ingestion race (concurrent identical upserts vs a non-arbiter unique index → 23505/40P01) reproduced deterministically and fixed with a per-group pg_advisory_xact_lock; DB errors now preserve SQLSTATE/constraint/DETAIL
1.1 Turn terminal integrity FIFO queue disposition for failed/cancelled outcomes; canonical TurnFailed fact with actor+turn dedupe key; coordinator-Terminal / worker-Neutral classification; legacy pending projection deleted; deterministic root+worker catch-all failure e2e; typed policy-rejection codes survive sanitization via a closed allowlist
2.1 Security profiles SecurityProfile::{Local,Cloud}; cloud construction fail-closed (Deny default, real rule store, non-local sandbox, credentials present) before serving; allow_local_provider / MOA_CLOUD_HANDS_ALLOW_LOCAL hard-deleted; production k8s renders Cloud+Deny+E2B with the E2B secret moved out of base
2.3 Tenant credential vault V000346 encrypted versioned credential store + append-only audit (forced RLS, DB-owned one-active-version); typed trait (create/resolve/rotate/revoke/delete_connection/purge_tenant); env vaults deleted; single runtime owner injected everywhere; V000358 link-claim table driving a reserve→written→compensating→compensated→finalized CAS flow; Nango/Merge trigger idempotency (no credit-consuming force-resync); plaintext handoff via non-serializable RedactedSecret
1.2 Message retry identity Required ClientMessageId + typed reply_to; domain-versioned canonical request hash; Session admission fence consulted before every side effect (24h/256-entry terminal retention, eviction metrics); deterministic UUIDv5 attachment slots with create-only object storage (S3ConditionalPut::ETagMatch); exact reply matrix; SSE reconnect passes the fence; Session/post_message deleted
3.1 Graph occurrence identity chunk_uid IS the graph identity (domain field deleted; DB column constrained NOT NULL + CHECK(= chunk_uid)); V000347 backfills occurrence nodes/edges/embeddings with a replay-vanishing predicate and vector-outbox sync; hydration DISTINCT ON removed; deletion covers all active versions; content-hash uniqueness index dropped (occurrence identity owns uniqueness)

Also in this change

  • Bounded TestDb::Drop cleanup (fixes a client-side hang that intermittently
    killed a db-memory test at 240s under lane adjacency; blackhole-URL
    regression pins the bound between 15s and the ~35s OS SYN floor)
  • PII sidecar image unbroken: transformers pinned to 5.14.1 (the git@main
    pin drifted to a revision incompatible with torch 2.7.1)
  • Two stale planner-contract e2e assertions repaired (response_format vs
    in-prompt schema marker) — only visible inside the clean-e2e lanes
  • 13 credential-vault DB tests un-#[ignore]d (the plan's own verification
    command silently skipped all of them)

Verification

  • cargo nextest run --locked --profile fast-pr: 2,924 passed / 0 failed
    (program baseline: 2,872 with 2 failures)
  • MOA_RUN_LIVE_E2E=1 ./scripts/run-clean-e2e.sh --live: passed end-to-end
    (22 phases; runs 20260724193230 and 20260724214424, the latter including Task 1.2's fence tests in the shared-orchestrator lane)
  • Workspace clippy --all-targets --all-features -D warnings, workspace build,
    fmt, git diff --check: clean
  • Mutation ledgers: 0.1/0.2 (checker + race + journal), 1.1 (4), 2.1 (5+2),
    2.3 (15), 1.2 (6), 3.1 (7) — every mutation failed a named assertion and was
    restored green

Recorded deviations from the plan text (all argued in-doc)

  1. 2.1: intrinsic AdminReview is a liftable cautious default (an exact
    matched persisted Allow rule wins); only intrinsic Deny and
    operator-configured overrides are unliftable floors. The literal clause
    would have made bash and every MCP tool permanently ungrantable.
  2. 2.3: the link-claim table is V000358 (plan pre-allocates V000347–357
    to later tasks); tenant purge is a bounded-batch purge_tenant(limit, ctx)
    sweep on the vault trait.
  3. 1.2: attachments are never reply candidates (explicit reply_to +
    attachments is a typed 400); text-only ambiguity still rejects.

Remaining program work (1.3, 2.2, 2.4, 3.2, 3.3, M4–M7) continues on top of
this tranche.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KoeipyuEzdLi5yw5QiHd9e

…rity, security profiles, credential vault, retry identity, occurrence identity

Implements seven P0 tasks (0.1, 0.2, 1.1, 1.2, 2.1, 2.3, 3.1) from
docs/engineering-discipline/plans/2026-07-22-moa-high-value-improvements.md,
each with full verification and a fail-then-restore mutation ledger:

- resurrect the architecture checker with pre-scan path validation, honest
  ratchets (ADR 0003), repository-extracted SQL, and an injected event
  appender replacing raw OrchestratorCtx::current()
- fix both standing baseline failures: the stale journal-role fixture and a
  contact-group ingestion race (23505/40P01 vs a non-arbiter unique index),
  now guarded by a per-group advisory lock with DB errors preserving
  SQLSTATE/constraint/DETAIL
- one canonical TurnFailed fact per actor+turn with FIFO disposition for
  failed/cancelled outcomes, worker-neutral classification, and a closed
  allowlist preserving typed policy-rejection codes
- explicit Local/Cloud security profiles with fail-closed cloud construction
  and hard-deleted local-provider escape hatches
- durable encrypted tenant credential vault (V000346) with append-only audit,
  bounded-batch tenant purge, reserve/claim/finalize link flow (V000358),
  Nango/Merge trigger idempotency, and non-serializable secret handoff
- required ClientMessageId with a canonical-request-hash admission fence,
  deterministic create-only attachment slots, an exact reply matrix, and
  fence-checked SSE reconnect; Session/post_message deleted
- chunk_uid becomes the graph occurrence identity (V000347 backfill with a
  replay-vanishing predicate); hydration DISTINCT ON removed; deletion covers
  every active version

Also: bounded TestDb drop cleanup (fixes an intermittent 240s db-memory
hang), pinned transformers 5.14.1 for the PII sidecar, repaired two stale
planner-contract assertions, and un-ignored 13 vault DB tests the milestone
gate was silently skipping.

Verification: fast-pr 2,924 passed / 0 failed (baseline 2,872 with 2
failures); clean-e2e --live passed end-to-end twice (runs 20260724193230 and
20260724214424); workspace clippy -D warnings, build, fmt clean; 40+
mutations each failed a named assertion and were restored green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoeipyuEzdLi5yw5QiHd9e
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 222 files, which is 122 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 05aa5404-4283-46c5-8642-e3c1b430a752

📥 Commits

Reviewing files that changed from the base of the PR and between c2bbe7c and 649ddff.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (222)
  • .config/nextest.toml
  • .env.example
  • .github/workflows/integration-tests.yml
  • SEQUENCE-DIAGRAMS.md
  • crates/moa-auth/providers/Cargo.toml
  • crates/moa-auth/providers/src/lib.rs
  • crates/moa-auth/providers/src/postgres_credential_vault.rs
  • crates/moa-auth/providers/tests/auth_providers_db.rs
  • crates/moa-auth/providers/tests/auth_providers_db/tenant_credential_vault_db.rs
  • crates/moa-brain/examples/chat_harness.rs
  • crates/moa-brain/src/compaction.rs
  • crates/moa-brain/src/pipeline/history/errors.rs
  • crates/moa-brain/tests/brain_db_memory/hybrid_retrieval_db_memory.rs
  • crates/moa-brain/tests/brain_db_memory/tenant_contact_knowledge_retrieval_db_memory.rs
  • crates/moa-brain/tests/cache_audit_live.rs
  • crates/moa-config/src/env_overlay/mod.rs
  • crates/moa-config/src/env_overlay/providers.rs
  • crates/moa-config/src/env_overlay/tests.rs
  • crates/moa-config/src/lib.rs
  • crates/moa-config/src/sandbox.rs
  • crates/moa-config/src/security.rs
  • crates/moa-core/src/error.rs
  • crates/moa-core/src/events.rs
  • crates/moa-core/src/session_engine.rs
  • crates/moa-core/src/traits/mod.rs
  • crates/moa-core/src/types/contact.rs
  • crates/moa-core/src/types/credentials.rs
  • crates/moa-core/src/types/credentials/tests.rs
  • crates/moa-core/src/types/mod.rs
  • crates/moa-core/src/types/tools.rs
  • crates/moa-core/src/types/worker/commands.rs
  • crates/moa-core/src/types/worker/commands/tests.rs
  • crates/moa-edge/src/routes.rs
  • crates/moa-edge/src/routes/auth_accounts.rs
  • crates/moa-edge/src/routes/contact_messages.rs
  • crates/moa-edge/src/routes/knowledge.rs
  • crates/moa-edge/src/routes/tests.rs
  • crates/moa-edge/src/tenant_accounts/application.rs
  • crates/moa-edge/tests/direct_read_routes_db.rs
  • crates/moa-edge/tests/direct_read_routes_db/session_messages_db.rs
  • crates/moa-edge/tests/session_message_attachments_docker.rs
  • crates/moa-eval/core/src/conversation_cost.rs
  • crates/moa-execution/tests/execution_db.rs
  • crates/moa-hands/src/core/construction.rs
  • crates/moa-hands/src/core/dispatch.rs
  • crates/moa-hands/src/core/registration.rs
  • crates/moa-hands/tests/daytona_live.rs
  • crates/moa-hands/tests/e2b_live.rs
  • crates/moa-hands/tests/hands_offline/mcp_router.rs
  • crates/moa-hands/tests/hands_offline/security_defaults.rs
  • crates/moa-knowledge/src/chunking.rs
  • crates/moa-knowledge/src/domain/document.rs
  • crates/moa-knowledge/src/domain/link_claim.rs
  • crates/moa-knowledge/src/domain/mod.rs
  • crates/moa-knowledge/src/domain/provider.rs
  • crates/moa-knowledge/src/domain/sync.rs
  • crates/moa-knowledge/src/error.rs
  • crates/moa-knowledge/src/graph_delta.rs
  • crates/moa-knowledge/src/ingestion/materialization.rs
  • crates/moa-knowledge/src/ingestion/record.rs
  • crates/moa-knowledge/src/ingestion/steps.rs
  • crates/moa-knowledge/src/observability.rs
  • crates/moa-knowledge/src/providers/merge.rs
  • crates/moa-knowledge/src/providers/mod.rs
  • crates/moa-knowledge/src/providers/nango/mod.rs
  • crates/moa-knowledge/src/repository/connection.rs
  • crates/moa-knowledge/src/repository/contact_group.rs
  • crates/moa-knowledge/src/repository/document.rs
  • crates/moa-knowledge/src/repository/link_claim.rs
  • crates/moa-knowledge/src/repository/mod.rs
  • crates/moa-knowledge/src/repository/row_mapping.rs
  • crates/moa-knowledge/src/repository/sync.rs
  • crates/moa-knowledge/src/semantic_graph.rs
  • crates/moa-knowledge/src/semantic_graph_model.rs
  • crates/moa-knowledge/tests/knowledge_db_memory.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/contact_groups_db_memory.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/ingestion_pipeline_db_memory/concurrency.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/ingestion_pipeline_db_memory/deletion.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/ingestion_pipeline_db_memory/idempotency.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/ingestion_pipeline_db_memory/mod.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/ingestion_pipeline_db_memory/occurrence_identity.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/ingestion_pipeline_db_memory/semantic_graph.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/link_claim_db_memory.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/observability_db_memory.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/repository_db_memory.rs
  • crates/moa-knowledge/tests/knowledge_db_memory/sync_run_db_memory.rs
  • crates/moa-knowledge/tests/knowledge_offline/provider_merge.rs
  • crates/moa-knowledge/tests/knowledge_offline/provider_nango.rs
  • crates/moa-knowledge/tests/provider_live.rs
  • crates/moa-loadtest/src/backend.rs
  • crates/moa-loadtest/src/edge_backend.rs
  • crates/moa-loadtest/src/runner.rs
  • crates/moa-memory/vector/tests/memory_vector_db_memory/vector_sync_outbox_db_memory.rs
  • crates/moa-messaging/src/delivery.rs
  • crates/moa-messaging/src/lib.rs
  • crates/moa-messaging/src/postmark.rs
  • crates/moa-messaging/src/twilio.rs
  • crates/moa-messaging/tests/messaging_offline/postmark_offline.rs
  • crates/moa-messaging/tests/messaging_offline/rate_limiting.rs
  • crates/moa-messaging/tests/messaging_offline/twilio_offline.rs
  • crates/moa-messaging/tests/postmark_provider_e2e.rs
  • crates/moa-messaging/tests/twilio_provider_e2e.rs
  • crates/moa-migrations/Cargo.toml
  • crates/moa-migrations/migration-ownership.toml
  • crates/moa-migrations/migrations/postgres/V000346__tenant_credential_vault.sql
  • crates/moa-migrations/migrations/postgres/V000347__knowledge_graph_occurrences.sql
  • crates/moa-migrations/migrations/postgres/V000358__knowledge_link_claims.sql
  • crates/moa-migrations/src/lib.rs
  • crates/moa-migrations/tests/run_idempotency_db.rs
  • crates/moa-ocsf/src/signing.rs
  • crates/moa-orchestrator/src/main.rs
  • crates/moa-orchestrator/src/objects/session/handlers.rs
  • crates/moa-orchestrator/src/objects/session/message_admission.rs
  • crates/moa-orchestrator/src/objects/session/mod.rs
  • crates/moa-orchestrator/src/objects/session/state.rs
  • crates/moa-orchestrator/src/objects/worker/handlers.rs
  • crates/moa-orchestrator/src/runtime/deps.rs
  • crates/moa-orchestrator/src/runtime/endpoint.rs
  • crates/moa-orchestrator/src/services/contacts.rs
  • crates/moa-orchestrator/src/services/dual_control.rs
  • crates/moa-orchestrator/src/services/dual_control/repository.rs
  • crates/moa-orchestrator/src/services/knowledge/inspect.rs
  • crates/moa-orchestrator/src/services/knowledge/link.rs
  • crates/moa-orchestrator/src/services/knowledge/mod.rs
  • crates/moa-orchestrator/src/services/knowledge/sync.rs
  • crates/moa-orchestrator/src/services/knowledge/webhook.rs
  • crates/moa-orchestrator/src/services/tool_executor.rs
  • crates/moa-orchestrator/src/turn_driver/progress.rs
  • crates/moa-orchestrator/src/workflows/execution_run.rs
  • crates/moa-orchestrator/src/workflows/experiment_run/target_execution.rs
  • crates/moa-orchestrator/src/workflows/experiment_trial_run/target_execution.rs
  • crates/moa-orchestrator/src/workflows/knowledge_sync_ingestion.rs
  • crates/moa-orchestrator/src/workflows/mod.rs
  • crates/moa-orchestrator/src/workflows/tenant_purge/mod.rs
  • crates/moa-orchestrator/src/workflows/tenant_purge/repository.rs
  • crates/moa-orchestrator/src/workflows/turn_events.rs
  • crates/moa-orchestrator/src/workflows/turn_execution/experience.rs
  • crates/moa-orchestrator/src/workflows/turn_execution/guardrails.rs
  • crates/moa-orchestrator/src/workflows/turn_execution/implementation.rs
  • crates/moa-orchestrator/src/workflows/turn_execution/mod.rs
  • crates/moa-orchestrator/src/workflows/turn_execution/segments.rs
  • crates/moa-orchestrator/src/workflows/turn_execution/tests.rs
  • crates/moa-orchestrator/src/workflows/turn_execution/tools.rs
  • crates/moa-orchestrator/src/workflows/worker_turn_execution.rs
  • crates/moa-orchestrator/tests/behavior_lab_simulation_e2e.rs
  • crates/moa-orchestrator/tests/coordinator_worker_behavior_provider_e2e.rs
  • crates/moa-orchestrator/tests/execution_eval_provider_e2e.rs
  • crates/moa-orchestrator/tests/execution_execution_support/assertions.rs
  • crates/moa-orchestrator/tests/execution_execution_support/evaluation.rs
  • crates/moa-orchestrator/tests/execution_execution_support/fixtures.rs
  • crates/moa-orchestrator/tests/execution_run_service_e2e/routing.rs
  • crates/moa-orchestrator/tests/execution_run_service_e2e/terminal_matrix.rs
  • crates/moa-orchestrator/tests/experiment_agent_loop_e2e.rs
  • crates/moa-orchestrator/tests/experiment_trial_run_e2e.rs
  • crates/moa-orchestrator/tests/integration/action_policy_flow_e2e.rs
  • crates/moa-orchestrator/tests/integration/agent_artifacts_e2e.rs
  • crates/moa-orchestrator/tests/integration/guardrails_e2e.rs
  • crates/moa-orchestrator/tests/integration/session_brain_e2e.rs
  • crates/moa-orchestrator/tests/integration/session_vo_e2e.rs
  • crates/moa-orchestrator/tests/integration/turn_responsiveness_e2e.rs
  • crates/moa-orchestrator/tests/knowledge_service/connections.rs
  • crates/moa-orchestrator/tests/knowledge_service/ingestion.rs
  • crates/moa-orchestrator/tests/knowledge_service/inspection.rs
  • crates/moa-orchestrator/tests/knowledge_service/link_claim.rs
  • crates/moa-orchestrator/tests/knowledge_service/support.rs
  • crates/moa-orchestrator/tests/knowledge_service/trace.rs
  • crates/moa-orchestrator/tests/knowledge_service/webhook.rs
  • crates/moa-orchestrator/tests/orchestrator_db/execution_service_db.rs
  • crates/moa-orchestrator/tests/orchestrator_offline/session_vo.rs
  • crates/moa-orchestrator/tests/session_turn_lifecycle_service_e2e.rs
  • crates/moa-orchestrator/tests/support/mod.rs
  • crates/moa-orchestrator/tests/support/session_fixtures.rs
  • crates/moa-orchestrator/tests/tenant_purge_service_e2e.rs
  • crates/moa-orchestrator/tests/turn_terminal_failure_service_e2e.rs
  • crates/moa-retrieval/src/retrieval/hydration.rs
  • crates/moa-security/Cargo.toml
  • crates/moa-security/README.md
  • crates/moa-security/src/lib.rs
  • crates/moa-security/src/mcp_proxy.rs
  • crates/moa-security/src/mcp_proxy/tests.rs
  • crates/moa-security/src/policies.rs
  • crates/moa-session/src/attachment_storage.rs
  • crates/moa-session/src/store/dashboard.rs
  • crates/moa-session/src/store/session_attachments.rs
  • crates/moa-session/tests/session_attachments_docker.rs
  • crates/moa-test-support/src/fixtures.rs
  • crates/moa-test-support/src/orchestrator_fixture/conversation.rs
  • crates/moa-test-support/src/orchestrator_fixture/process.rs
  • crates/moa-test-support/src/postgres.rs
  • crates/moa-test-support/tests/fixtures_round_trip.rs
  • crates/moa-test-support/tests/orchestrator_fixture_service_e2e.rs
  • crates/moa-wire/Cargo.toml
  • crates/moa-wire/src/knowledge.rs
  • crates/moa-wire/src/tenants.rs
  • crates/moa-wire/src/turn.rs
  • crates/xtask/src/check_architecture_boundaries.rs
  • crates/xtask/src/execution_trace_manifest.rs
  • crates/xtask/src/wixqa_rag_eval.rs
  • docker-compose.yml
  • docs/01-architecture-overview.md
  • docs/02-brain-orchestration.md
  • docs/03-communication-layer.md
  • docs/04-memory-architecture.md
  • docs/05-session-event-log.md
  • docs/06-hands-and-mcp.md
  • docs/08-security.md
  • docs/10-technology-stack.md
  • docs/12-restate-architecture.md
  • docs/15-architecture-policy.md
  • docs/21-tenant-knowledge-base.md
  • docs/23-environment-variables.md
  • docs/engineering-discipline/plans/2026-07-22-moa-high-value-improvements.md
  • docs/eval/execution-honesty.md
  • k8s/base/15-runtime-config.yaml
  • k8s/base/20-orchestrator-deployment.yaml
  • k8s/overlays/production/kustomization.yaml
  • k8s/overlays/production/patches/orchestrator-security-profile.yaml
  • k8s/overlays/production/patches/runtime-security-profile.yaml
  • k8s/scripts/observability-smoke.sh
  • k8s/scripts/smoke.sh
  • scripts/run-clean-e2e.sh
  • services/pii-service/requirements.txt

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch high-value-improvements-m0-m3

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.

hwuiwon and others added 5 commits July 25, 2026 18:38
…indings

- db-tests: per-test-schema auth migrations reference moa_app but exclude
  V000001, which creates it; on a pristine CI cluster the bootstrap raced
  whichever full-template build ran first, and the new vault tests reordered
  the schedule so the auth harness now runs first and loses. Create the three
  shared roles idempotently in install_shared_extensions_locked, under the
  same advisory lock that already serializes extension creation.
- restate-fixture-smoke: rename knowledge_caller to authorize_knowledge_caller
  so the handler-authz scan sees the authorization it performs, and repoint
  the turn_events trace-manifest sender from append_session_event to
  append_with_identity, where the replay-safe request now lives.

check-architecture-boundaries exits 0; auth_providers_db 32/32; orchestrator
lib 409/409; manifest tests 4/4; fmt, clippy -D warnings, git diff clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoeipyuEzdLi5yw5QiHd9e
… race

Main's db-tests has been red on the auth-harness role race, so fail-fast never
reached these; the previous fix unblocked the pipeline and surfaced them:

- execution_db: the shared budget helper built nanosecond deadlines that only
  equalled their Postgres round-trip when the clock landed on a whole
  microsecond; truncate up front so equality is exact, not clock-lucky
- messaging rate-limiting: the paused-clock wait helper budgeted 100ms of
  virtual time, less than a legitimate limiter-refill or jittered backoff on
  a loaded runner; widen to 5 virtual seconds (zero wall-time cost), full
  suite stress-verified 10x
- rustfs: pin rustfs/rc and rustfs/rustfs by locally-verified digest — CI's
  fresh `:latest` pull crashed init with exit 7 while local caches kept a
  working revision, the same unpinned-image drift the PII sidecar hit

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoeipyuEzdLi5yw5QiHd9e
…smoke workflow that could never pass

- moa-ocsf: concurrent first-event signers ran full rotate_key, so a signer
  arriving after the winner's commit deactivated the winner and minted a
  second key generation — signers could observe different key ids (caught by
  CI's sign_cached concurrency test). First use is now create-if-absent
  against the partial unique active index and never deactivates anything;
  rotate_key remains for explicit rotation only.
- messaging rate-limiting tests: the paused-clock wait helper busy-spun
  through its iterations in microseconds of wall time, so on loaded runners
  the loop exhausted before the OS ever delivered the localhost round-trip;
  which test in the family died was scheduling luck. Each iteration now
  awaits a 1ms blocking-thread sleep so the runtime gets real windows to
  drive I/O, alongside the virtual advance that funds limiter and backoff
  schedules.
- integration-tests workflow: pointed at ports nothing publishes
  (18080/9070/25432 vs compose's 10010/10011/10040) and forced the external
  orchestrator env onto the scripted fixture that refuses one by design —
  the smoke could never have passed as written. Ports corrected and the two
  tests split into external-orchestrator and dedicated-fixture steps,
  mirroring the clean-e2e ladder's profile split; timeout raised for the
  fixture build the always-bailing invocation never paid for.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoeipyuEzdLi5yw5QiHd9e
The previous fix repaired one site of a platform-dependent class:
Utc::now()-derived deadlines carry nanoseconds, Postgres round-trips
microseconds, and equality assertions against read-back budgets therefore
pass on microsecond-granular macOS clocks while failing almost always on
nanosecond-granular Linux CI clocks. Local runs were green by platform, not
by correctness. Every DB-reachable budget deadline construction now truncates
to microseconds: a shared pg_deadline helper in execution_db plus the
replan_budget and execution_service_db fixture sites. Remaining
Utc::now() fixtures were audited as offline/mock-only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoeipyuEzdLi5yw5QiHd9e
…ture

The dedicated scripted fixture boots its own testcontainers stack and
orchestrator; alongside the still-running compose stack the two-core runner
starved badly enough (218s for one scripted turn) that the route
classifier's bounded call timed out and the router took its deliberate
conservative Inline fallback, so the expected Accepted outcome came back
Completed. The compose-backed smoke passed with the corrected ports, so tear
the compose stack down between the two steps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KoeipyuEzdLi5yw5QiHd9e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant