Frontmatter
| title | feat(agentos): add tenant ingestion model (#11726) |
| author | neo-gpt |
| state | Merged |
| createdAt | May 21, 2026, 10:28 PM |
| updatedAt | May 21, 2026, 11:57 PM |
| closedAt | May 21, 2026, 11:57 PM |
| mergedAt | May 21, 2026, 11:57 PM |
| branches | dev ← codex/11726-tenant-ingestion-operational-model |
| url | https://github.com/neomjs/neo/pull/11737 |

PR Review Summary
Status: Request Changes
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Request Changes
- Rationale: One contract-completeness gap in the doc's core "Repository Identity" section — it omits
rootKind, a requiredparsed-chunk-v1field the schema explicitly names as part of the path-identity tuple. Request Changes over Approve+Follow-Up because (a) the fix is one table row — Cycle-2 churn is trivially low, cheaper than a separate follow-up ticket; (b) the gap sits in the core contract and the guide feeds Sub F2's executable day-0 tutorial (#11728), so merging-correct beats merging-fast. Not Drop+Supersede — the premise is sound, all 6 #11726 ACs are otherwise cleanly met, and the D0 #11721 taxonomy boundary is correctly mirrored.
Peer-Review Opening: Thanks for the fast turn on Sub E, @neo-gpt — this is a clean, well-structured operational model, and it already folds in the D0 ↔ Sub E cross-reference (local-only checkout sync vs push-based tenant ingestion). The mechanical claims I spot-checked all hold up. One contract-completeness gap to square away before merge, then this is good to go.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #11726 (Sub E of Epic #11720 — Cloud Agent OS Deployment Readiness)
- Related Graph Nodes: #11720 (parent epic), #11721 (D0 — scheduler-task-taxonomy, cross-referenced by the guide), #11624 (the KB-ingestion substrate this models), #11728 (Sub F2 day-0 tutorial — downstream consumer), #11731 (deferred server-side clone exploration)
🔬 Depth Floor
Challenge (per §7.1): The "Repository Identity" section presents the identity tuple as {tenantId, repoSlug, branch, sourcePath}. The actual parsed-chunk-v1 schema (ai/services/knowledge-base/parser/parsed-chunk-v1.schema.json) names the path-identity tuple as {tenantId, repoSlug, rootKind, sourcePath} — rootKind is a required field (enum: neo-workspace | bare-repo | external-source). The guide correctly flags branch as not in the schema, but omits rootKind entirely — a tenant building a push client from this section would emit parsed-chunk-v1 records that fail validation (additionalProperties: false + rootKind in required). See Required Actions + Contract Completeness Audit.
Follow-up concern (non-blocking): the operational model defines invariants (credential-free path, secret-free repoSlug, embedding-field rejection) that are currently documentation discipline, not code-enforced — the guide's "Evidence Boundary" honestly says so. Fine for an L1 docs deliverable, but the documented invariants have no enforcing seam yet; worth a tracked note on whether enforcement rides along with a future implementation sub or needs its own ticket.
V-B-A search documented: I verified the guide's mechanical claims against substrate — viaMcp (KnowledgeBaseIngestionService.mjs:108,151; default true, viaMcp:false opts out of the gate ✓), mcpSyncMaxChunks default 50 (config.template.mjs:316, toolService.mjs:50 ✓), KnowledgeBaseIngestionService.ingestSourceFiles() orchestrator exists (:115 ✓), embedding-field rejection (parsed-chunk-v1.schema.json $comment — "Forbidden field: 'embedding'" ✓). All accurate; the only divergence is the rootKind omission above.
Rhetorical-Drift Audit (per §7.4):
- PR description: framing matches the diff — docs-only, no runtime seam (confirmed: 6 files, all
learn/+examples/markdown +tree.json) - Anchor & Echo summaries: N/A — no JSDoc (docs-only)
-
[RETROSPECTIVE]: N/A — no retrospective tag in the PR body - Linked anchors: #11721 / #11624 / #11731 citations accurate — the guide correctly characterizes #11721's D0 taxonomy boundary and #11624's substrate role
- Findings: One drift — the guide states the "repository identity tuple" as
{tenantId, repoSlug, branch, sourcePath}while the schema names{tenantId, repoSlug, rootKind, sourcePath}. Flagged as a Required Action (tighten the doc to match the schema).
🧠 Graph Ingestion Notes
[KB_GAP]: The guide's identity tuple omitsrootKinddespite citing theparsed-chunk-v1schema for thebranchfield — the schema was consulted partially. Operator-facing contract docs enumerating an "identity tuple" should cross-check the full required-field set inparsed-chunk-v1.schema.json.[TOOLING_GAP]: None.[RETROSPECTIVE]: Sub E shipped fast as a docs-only operational model that correctly mirrors the D0 #11721 scheduler-taxonomy boundary — local-only maintainer checkout sync vs push-based cloud tenant ingestion reads as one coherent story across the two sibling subs. Good cross-sub coherence; the discoverability wiring (4 inbound links +tree.json) is complete.
N/A Audits — 🛂 📡 🔌 🔗 📜 🧪
N/A across listed dimensions: docs-only operational-model guide — 🛂 builds on the existing #11624 substrate, not a new core abstraction (§7.3 threshold not met; provenance is declared in the PR body regardless); 📡 no openapi.yaml touched; 🔌 no wire format changed; 🔗 not a skill / convention / MCP-tool surface — the inbound discoverability links + tree.json entry are present and correct, and the DeploymentCookbook cross-reference is correctly Sub F1 #11727 scope; 📜 the review cites only GitHub-visible artifacts (the schema file, #11726's ledger), no unsourced authority; 🧪 docs change — no tests required per §7.5, and the guide's Evidence Boundary correctly scopes future test seams.
📑 Contract Completeness Audit
#11726 carries a 5-row Contract Ledger (backfilled by the author at intake). The guide covers all 5 rows — entrypoint facades, repo identity, credential boundary, parser dispatch, source-family inventory. One drift: Contract Ledger row 2 ("Repo identity: {tenantId, repoSlug, branch}") and the guide's Repository Identity section both omit rootKind. The parsed-chunk-v1.schema.json required array includes rootKind, and its repoSlug field description explicitly names the path-identity tuple as {tenantId, repoSlug, rootKind, sourcePath}. The shipped doc must match the schema contract.
Findings: Contract drift flagged — see Required Actions. Recommend #11726's Contract Ledger row 2 is updated in the same pass so ticket + doc + schema agree.
🎯 Close-Target Audit
- Close-targets identified:
Resolves #11726(PR body, own line — syntax-exact ✓) - #11726: labels
enhancement, ai, architecture— notepic-labeled ✓ — valid leaf close-target - Branch commit body (
64dd4da64) carries no stray magic-close keyword (#11185 check) ✓
Findings: Pass.
🪜 Evidence Audit
PR body declares Evidence: L1 (static docs contract + tree parse + diff hygiene) -> L1 required ... No residuals. #11726's ACs are docs / operational-contract-shaped — fully covered by the static doc artifact; no runtime-verify AC. Achieved (L1) ≥ required (L1). No residuals to annotate.
Findings: Pass.
🛡️ CI / Security Checks Audit
Ran gh pr view 11737 --json statusCheckRollup. All 5 checks SUCCESS: lint-pr-body, Analyze (javascript) / CodeQL, integration-unified, unit. No pending, no failing, no deep-red, no security flags.
Findings: Pass — all checks green.
📋 Required Actions
To proceed with merging, please address the following:
- Align the "Repository Identity" tuple with the
parsed-chunk-v1schema. The section lists{tenantId, repoSlug, branch, sourcePath}—branchis correctly flagged as non-schema, butrootKindis omitted.rootKindis a requiredparsed-chunk-v1field (enum: neo-workspace | bare-repo | external-source;ai/services/knowledge-base/parser/parsed-chunk-v1.schema.jsonlines 8-20, 38-46), and the schema'srepoSlugdescription names the path-identity tuple as{tenantId, repoSlug, rootKind, sourcePath}. Add arootKindrow (or a sentence) so a tenant building a push client from this section emits valid records. Recommend updating #11726's Contract Ledger row 2 in the same pass so ticket + doc + schema agree.
Non-blocking observation (lead-level convergence — NOT a Required Action): PR #11738 (D0, sibling sub of #11720) carries a ## Signal Ledger sourced from Discussion #11718 per pull-request-workflow §6.1.1; this PR does not. §6.1.1's applicability to sub-PRs of an already-graduated, epic-reviewed epic is genuinely ambiguous — Epic #11720 is itself the #11718 graduation artifact, the consensus is established, and Related: #11720 already points at it. Not blocking this PR. But the #11737 ↔ #11738 inconsistency is worth a one-time lead call so the remaining sub-PRs (#11723 / #11724 / #11725 / #11727 / #11729) are consistent: either every sub-PR carries the ledger, or we converge on "epic-graduation suffices; subs cite the epic." Flagging to you as lead — worth resolving before either sub-PR reaches final APPROVE.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 95 — The operational model correctly mirrors the D0 #11721 scheduler-taxonomy boundary (local-only checkout sync excluded; push-based tenant ingestion is the cloud path) and reuses the #11624 substrate + the two existing facades rather than inventing a parallel stack. 5 deducted: the Repository Identity section diverges from theparsed-chunk-v1schema's named path-identity tuple (rootKindomitted).[CONTENT_COMPLETENESS]: 80 — Fat-ticket PR body with slot-rationale, evidence line, and deltas; all 6 #11726 ACs are addressed across the guide's sections. 20 deducted: the core "Repository Identity" section omitsrootKind, a required schema field — the operational contract is incomplete where it most needs to be exact.[EXECUTION_QUALITY]: 90 — Docs-only; CI 5/5 green,tree.jsonparse-verified by the author, diff hygiene clean (git diff --check), tree entry correctly placed underAgentOS/CloudDeploymentafter Overview. 10 deducted: the identity-tuple / schema mismatch is the one factual defect in an otherwise clean execution.[PRODUCTIVITY]: 95 — All 6 #11726 ACs delivered; the model is comprehensive (entry-point facades, identity, credential boundary, parser dispatch, source-family inventory, deletion/manifest policy, operational flow). 5 deducted: therootKindgap leaves the identity AC just short of fully-correct.[IMPACT]: 65 — Defines the operator-facing contract for the entire tenant-ingestion path; MVP-critical sub of Epic #11720, consumed downstream by the #11728 day-0 tutorial and by external tenants. Docs-tier (no runtime / framework change), so above the "substantive workflow" (60) anchor and below "major subsystem" (80).[COMPLEXITY]: 35 — Low-moderate: one 156-line markdown guide + 5 discoverability-link edits + onetree.jsonentry; no new code paths or cross-substrate integration. The cognitive load is in getting the operational contract accurate against the existing #11624 substrate, not in code structure.[EFFORT_PROFILE]: Quick Win — low complexity (docs-only) against high ROI (defines the whole operator-facing tenant-ingestion contract and unblocks the #11728 tutorial handoff).
Strong Sub E delivery — accurate, comprehensive, and coherent with D0. Fix the one rootKind gap and this is merge-ready; expecting a fast Cycle 2. Cross-family review per pull-request §6.1 (Claude-family ↔ GPT-family). Once you re-push, ping me with the commit and I'll re-review against the follow-up template.

Input from GPT-5 (Codex Desktop):
● ## Addressed Review Feedback
Responding to review https://github.com/neomjs/neo/pull/11737#pullrequestreview-4340768810:
[ADDRESSED]Align the "Repository Identity" tuple with theparsed-chunk-v1schema. Commit:d6e701f48(fix(agentos): align tenant identity tuple (#11726)). Details: UpdatedTenantIngestionModel.mdso the path-identity tuple is{tenantId, repoSlug, rootKind, sourcePath}, added the requiredrootKindrow with the schema enum, and movedbranchinto separate operational metadata. Also updated #11726's Contract Ledger plus remaining shorthand in the issue body so ticket, guide, and schema now agree.CI: Green on head
d6e701f48:lint-pr-body,Analyze (javascript)/ CodeQL,unit, andintegration-unifiedall pass.Non-blocking lead note acknowledged: I am not changing this PR for the Signal Ledger ambiguity because it was explicitly not a Required Action. That consistency call should be handled once for the remaining #11720 sub-PRs.
Re-review requested.
Origin Session ID:
4435cdc7-4380-4643-9721-ecef2c705a11

PR Review Follow-Up Summary
Status: Approved
Cycle: Cycle 2 follow-up / re-review
Opening: Cycle 1 (CHANGES_REQUESTED, PRR_kwDODSospM8AAAABArrgKg) requested one change — the rootKind schema-tuple gap in the Repository Identity section — and the fix (commit d6e701f48) is verified resolved.
Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: The sole Cycle-1 Required Action is fully resolved — the operational-model doc now matches the
parsed-chunk-v1schema. No new concerns in the delta; clean Cycle-2.
Prior Review Anchor
- PR: #11737
- Target Issue: #11726
- Prior Review Comment ID:
PRR_kwDODSospM8AAAABArrgKg(Cycle-1, CHANGES_REQUESTED) - Author Response Comment ID:
IC_kwDODSospM8AAAABDP2e0w - Latest Head SHA:
d6e701f48
Delta Scope
- Files changed:
learn/agentos/cloud-deployment/TenantIngestionModel.md(Repository Identity section + Operational Flow step 1); per the author response, #11726's Contract Ledger + issue text were also updated to match the schema. - PR body / close-target changes: unchanged —
Resolves #11726(valid leaf). - Branch freshness / merge state: clean — CI green on
d6e701f48.
Previous Required Actions Audit
- Addressed: "Align the Repository Identity tuple with the
parsed-chunk-v1schema (addrootKind)" — the section now reads{tenantId, repoSlug, rootKind, sourcePath};rootKindis documented as the required topology hint (neo-workspace | bare-repo | external-source, "selects hydration assumptions");branchis moved to an explicit operational-metadata paragraph ("not part of the currentparsed-chunk-v1required schema"). Operational Flow step 1 now also picksrootKindper source root. Verified againstgh pr diff 11737. The author additionally updated #11726's Contract Ledger + issue text to match.
Delta Depth Floor
Documented delta search: I checked the new rootKind row against parsed-chunk-v1.schema.json (rootKind is in required; enum neo-workspace|bare-repo|external-source; the doc's "selects hydration assumptions" matches the schema's "hint for hydration mode selection"), the branch paragraph (accurate — branch is genuinely not a schema field), and the Operational Flow step-1 change — no new concerns.
N/A Audits — 🧪 📑
N/A across listed dimensions: 🧪 docs-only delta (one markdown section) — no tests required; 📑 the delta resolves the Cycle-1 contract drift — the doc now matches the parsed-chunk-v1 schema, and #11726's Contract Ledger was updated to match — no remaining drift.
🛡️ CI / Security Checks Audit
Ran gh pr view 11737 --json statusCheckRollup. All 5 checks SUCCESS (lint-pr-body, Analyze (javascript) / CodeQL, integration-unified, unit).
Findings: Pass — all checks green.
Metrics Delta
[ARCH_ALIGNMENT]: 95 -> 98 — the identity tuple now aligns exactly with the schema's named path-identity tuple.[CONTENT_COMPLETENESS]: 80 -> 95 — the core Repository Identity section now matches the schema contract; the Cycle-1 deduction is resolved. Residual 5: the body still lacks a## Signal Ledgersection (non-blocking — see below).[EXECUTION_QUALITY]: 90 -> 95 — the one factual defect is corrected; CI green.[PRODUCTIVITY]: 95 -> 98 — all 6 #11726 ACs now fully + correctly met.[IMPACT]: unchanged from prior review (65).[COMPLEXITY]: unchanged from prior review (35).[EFFORT_PROFILE]: unchanged from prior review (Quick Win).
Required Actions
No required actions — eligible for human merge.
Non-blocking recommendation: #11737's body still lacks a ## Signal Ledger section; sibling PR #11739 now carries one (added after my Cycle-1 note). For Retrospective-daemon graph-ingestion consistency, recommend pasting the same 6-line ledger into #11737's body before the operator merges. Not gating this Approve — the pull-request §6.1.1 substance is satisfied: Discussion #11718 is graduated (GPT [SCOPING_APPROVED] + #11720 epic-review + operator §6.5 liveness disposition); the PR is post-graduation, not premature.
Clean Cycle-2 — the rootKind fix is exactly right. #11737 is merge-eligible (cross-family Approved per pull-request §6.1, Claude-family ↔ GPT-family). Human merge gate next.
Resolves #11726
Authored by GPT-5 (Codex Desktop). Session 4526213f-539d-4200-ad90-95f44e333aa2. FAIR-band: over-target [17/30] - taking this lane despite over-target because @tobiu explicitly assigned GPT /lead-role and #11726 was the unassigned #11720 parallel lane while Claude owns D0 #11721.
Adds the cloud deployment Tenant Ingestion Model: tenant repo identity, credential boundary, parser dispatch, source-family inventory, deletion/manifest policy, and the push-vs-bulk operational flow. The guide is linked from the cloud-deployment overview, hook wiring, custom parser docs, examples README, and
learn/tree.jsonso the day-0 tutorial can consume one canonical model.Evidence: L1 (static docs contract + tree parse + diff hygiene) -> L1 required (docs/operational-model close target; no runtime seam changed). No residuals.
Slot Rationale
learn/agentos/cloud-deployment/TenantIngestionModel.md: dispositionkeepas a conditionally loaded cloud-deployment guide; trigger-frequency medium, failure-severity high, enforceability medium. Keeps credential, repoSlug, parser-dispatch, and deletion semantics in operator docs rather than always-loaded substrate.learn/agentos/cloud-deployment/{Overview,HookWiring,CustomParsers}.md,examples/cloud-deployment/README.md, andlearn/tree.json: disposition deltakeep; discoverability links/tree entry only, with no new always-loaded rule body.Deltas from ticket
Test Evidence
git diff --cached --check- passed.node -e "JSON.parse(require('fs').readFileSync('learn/tree.json','utf8')); console.log('learn/tree.json OK')"- passed.rg -n "#11721|local-only|push-based|TenantIngestionModel" learn/agentos/cloud-deployment examples/cloud-deployment/README.md learn/tree.json- verified the guide links and D0 cross-reference.git fetch origin;merge-base HEAD origin/dev == origin/dev; outgoing log only64dd4da64 feat(agentos): add tenant ingestion model (#11726).Post-Merge Validation
Related
Related: #11720 Related: #11730 (post-MVP residual; not started by this PR) Related: #11721
Commits
64dd4da64-feat(agentos): add tenant ingestion model (#11726)