Skip to content

Round-3 review deferred items (post fix/round-3-review PR) #1755

Closed as not planned

Description

@larryro

Tracking item for findings from the round-3 multi-agent review that were intentionally deferred from the bundled fixes PR (branch fix/round-3-review). All items here are P2/P3-scope cleanups, latent issues, or operationally-significant gaps that don't block the demo-stage deploy.

Highest priority (revisit before non-demo deploy)

  • P1-8 — Deleted upgrade framework / volume-rename data loss. tools/cli/src/lib/upgrade/{adopt-convex-stateful,namespace-caddy-config,namespace-volumes,split-convex,runner,registry,state,volume-helpers}.ts were removed in 5deaa5a8c. Operators upgrading from ≤0.3.1 get fresh empty ${projectId}-dev_convex-data volumes while their original tale_platform-data sits orphaned — silent total data loss. Either restore a one-shot detect+rename pass in tale upgrade, or document the manual docker volume rename runbook in docs/en/self-hosted/operate/upgrades.md and add a tale upgrade warning when ≤0.3.1 markers are detected.

Cross-tenant / observability defense-in-depth

  • R20-P2-c — BM25/HNSW indexes have no org_slug awareness. services/rag/app/services/search_service.py:267-322 over-fetches top_k * 3 and post-filters, which under heavy tenant skew can still drop recall to zero. Investigate filtered/partial indexes or per-row predicate pushdown (paradedb supports this).
  • R11-P2-a/b/d — workflow_engine RAG defense-in-depth hygiene. deleteFromRagBatch lacks per-call cross-check that all fileIds ∈ orgSlug; search op with fileIds:[] short-circuits the gate; uploadDocument derives orgSlug from file metadata not workflow vars. All currently safe by construction; tighten as the workflow surface grows.
  • R10-P2-a — getAccessibleDocumentIds full-org scan per workflow op. services/platform/convex/workflow_engine/action_defs/document/document_action.ts:64-82,605-611. Add a hasDocumentAccess(documentId) single-doc internal query + memo-hoist across consecutive same-org/user ops. Will hit Convex per-query read-cap on orgs with thousands of documents.

Test-quality gaps

  • R23-P2-a/b/c/d/e/f — RAG test improvements. test_org_isolation.py and test_semantic_cache_isolation.py are SQL-shape assertions over AsyncMock-returned-None rather than realistic cross-org behaviour; concurrent same-file-across-orgs and _org_clients LRU eviction-in-use paths uncovered; module-global _background_tasks not reset between tests.
  • R27-P2-a/b/c/d — Crawler test gaps. Router tests don't assert org_has_membership call args; TestUpdateWebsite.test_500_on_error dropped without replacement; test_vision_isolation.py is sequential single-task only (no concurrent cross-org race).
  • R11-P2-c — No rag_action.test.ts to pin assertStorageIdsInOrg cross-org refusal across the four ops.

Cosmetic / doc / latent

  • R17 — stale services/platform/.tale/reference/convex/migrations/rename_org_slug.ts snapshot. Code paths clean; only the gitignored .tale/reference/ snapshot still contains the removed file. Cleanup on next tale init regenerates.
  • R18-P2-a — SSE fan-out comment vs code drift (latent). services/platform/server.ts:60-68 predicate is default-allow when eventOrg is falsy, contradicting the comment. No live event reaches the leaky branch today; one-line fix is to invert to if (!eventOrg || …) continue;.
  • R18-P2-c — Stale docker-entrypoint.sh:190-192 comment about per-domain env var fallback (now actively purged); doc-only.
  • R18-P2-e — SSE cancel() latent fragility. let client: SseClient; declared without initializer; cancel-before-start would sseClients.delete(undefined) (harmless today; brittle to future refactor).
  • R10-P2-b — get_metadata team-private field signaling. Workflow get_metadata op drops sourceCreatedAt/sourceModifiedAt for team-gated docs with no accessDenied:true flag; condition steps can't distinguish.

Operational

  • R25-P2-a — Crawler "owner_org_slug" billing/quota leak. scheduler.py:72-86 get_due_websites picks the earliest-added org as billing target indefinitely. Either rotate by last_scanned_at per membership, or document "first-registrar pays" as the cost model.
  • R25-P2-b — Stuck-delete recovery runs without active org context. main.py:101-115. Currently inconsequential (execute_delete is org-context-free), but worth an assertion to lock the invariant.
  • R25-P2-c — Crawler register_website TOCTOU on status read (cosmetic; get_website is pre-fetched but register_website's UPSERT is what ultimately determines state).
  • R28-P2-c — load_providers SOPS decrypt cost on hot paths. Mitigated by 15s per-org client caches but still a per-call fork; consider @lru_cache keyed on (org_slug, providers_dir_mtime).
  • R29-P2-d — check-bundle.ts marker false-negative risk. MIGRATE_PLAN/MIGRATE_SUMMARY markers also appear in source comments. Use a unique sentinel only present in the embedded template literal.
  • R30-P2-c — start.ts literal docs/<locale> placeholder (fixed in PR; close this once merged).
  • R31-P2-b — tale start warns 4× per invocation (one per generator) when no org dirs found. Coalesce.
  • R31-P2-c — sink.write backpressure latent. Current callers (~5KB scripts) fit pipe buffer; future >64KB caller could deadlock.
  • R32-P2-a — Legacy detector warning noise on prior-main upgrade. services/convex/docker-entrypoint.sh:530-551 flags every prior-main volume (which always pre-created empty dirs). Filter to "exists AND contains non-.history content."

Source of truth

Findings raised in two rounds of multi-agent review (32 reviewers + 12 verifiers). Consolidated brief at /tmp/round1_findings.md on the engineer's machine; the fix PR's commit messages cite each finding by R#-tag for traceability.

Activity

  1. Israeltheminer commented on Jun 30, 2026

    @Israeltheminer
    Contributor

    Out of scope for the current projects/chats/automations triage pass — this is a cross-cutting CLI/RAG/crawler/docs review tracker, left open and untouched. Flagging only so it isn't mistaken for an unstarted platform-app item in that sweep.

  2. yannickmonney commented on Jul 7, 2026

    @yannickmonney
    Contributor

    The priority subset landed in #2533:

    • P1-8 — fallback option implemented: manual convex-data migration runbook documented in docs/{en,de,fr}/self-hosted/operate/upgrades.md, plus a conservative detect+warn in tale update (formerly tale upgrade) that flags platform-data volumes — per-project and pre-0.2.33 tale_/tale-dev_ prefixed — whose convex-data destination doesn't exist yet. No automatic rename; detection is existence-only and best-effort.
    • R18-P2-a — SSE fan-out is default-deny (shouldDeliverSseEvent, unit-tested).
    • R18-P2-e — SSE cancel() guarded against cancel-before-start.
    • R29-P2-d — check-bundle now greps for sentinels unique to the embedded template literals.
    • R31-P2-b — the "no org config" warning fires once per compose generation.
    • R30-P2-c — verified fixed on main (no docs/<locale> literal remains in tools/cli); can be checked off.
    • R32-P2-a — moot: the legacy flat-layout detector was removed entirely from services/convex/docker-entrypoint.sh in feat: zero-friction setup — guided CLI install, onboarding wizard, guided create flows #1879; can be checked off.

    Still open here: R23-* / R27-* / R11-P2-c (RAG & crawler test quality), R20-P2-c / R10-P2-a / R28-P2-c (index & perf), R11-P2-a/b/d, R10-P2-b, R25-a/b/c, R17, R18-P2-c, R31-P2-c.

  3. yannickmonney commented on Jul 11, 2026

    @yannickmonney
    Contributor

    Triage note (epics sweep, PR #2674): deferred from the umbrella-epic sweep with rationale — this is a meta tracking list spanning RAG/crawler/CLI review items, not a single change; its items should be split into individual issues when picked up. Stays open as a tracker under #2671.

  4. yannickmonney commented on Jul 11, 2026

    @yannickmonney
    Contributor

    Verified checklist after PR #2674 (all claims test-verified, not taken from the tracker):

    Landed in #2674: P1-8 (one-shot legacy-volume detect+rename in tale upgrade, dry-run + never-overwrite, + runbook in docs/en|de|fr + loud legacy-marker warning) · R18-P2-c (stale entrypoint comment rewritten).

    Already fixed before #2674 (mostly PR #2533, verified green): R18-P2-a (SSE default-deny + 4 unit tests) · R18-P2-e (cancel-before-start guard) · R29-P2-d (unique bundle sentinels) · R31-P2-b (single warning) · R30-P2-c (placeholder gone) · R32-P2-a (the flagged detector was removed wholesale in #1879).

    MOOT — the services no longer exist in this repo: services/crawler and services/rag were deleted in #1883, so R25-P2-a/b/c, R20-P2-c, R23-, R27-, R11-P2-c, R10-P2-a/b, R11-P2-a/b/d, R28-P2-c reference code that is gone. If those services live in another repo now, this tracker's items should move there.

    Remaining decisions (nothing actionable in this repo): none identified. Recommend closing this tracker or re-homing the RAG/crawler items.

  5. yannickmonney commented on Sep 27, 2026

    @yannickmonney
    Contributor

    Closing as obsolete. The priority subset landed in #2533 and #2674, and every remaining item targets services/rag or services/crawler, which no longer exist in the repository (absent at v0.5.58). Nothing is left for this tracker to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions