Skip to content

chore(openapi): deny the admin memory reads at the raw transport - #52

Merged
CodeGhost21 merged 1 commit into
mainfrom
chore/admin-memory-denylist
Oct 9, 2026
Merged

CodeGhost21 merged 1 commit into
mainfrom
chore/admin-memory-denylist

Conversation

@CodeGhost21

@CodeGhost21 CodeGhost21 commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

What

Syncs the SDK against the backend spec from tinyhumansai/backend#1414 (npm run swagger + scripts/sync-openapi.mjs --input), which adds five GET /admin/memory/* routes to the raw-transport denylist in src/generated_public_routes.rs:

  • four that were already on backend main but never synced: overview, storage, top-tenants, tenants/{userId}
  • one new route from backend#1414: GET /admin/memory/model-usage

All five are admin-only; no typed client method is added.

Ratchets

  • UNEXPOSED_ROUTES 59 → 64
  • excludedAdminOperationCount 47 → 52

Both bumped by exactly the five admin routes above.

Verification

cargo fmt --check, cargo clippy -D warnings and cargo test pass.

Follow-up

After this merges, tinyhumansai/backend#1414 moves its sdk gitlink to the merged commit.

Summary by CodeRabbit

  • API Access
    • Administrative memory-reporting routes remain unavailable through the public API, including usage, overview, storage, tenant details, and top-tenant reports.
  • Documentation
    • Updated API reference totals to reflect the current route and operation counts, including excluded administrative operations.

Sync against tinyhumansai/backend#1414's spec: the five GET /admin/memory/*
routes (overview, storage, top-tenants, tenants/{userId}, model-usage) join
UNEXPOSED_ROUTES. No typed method. Ratchets: UNEXPOSED_ROUTES 59 -> 64,
excludedAdminOperationCount 47 -> 52.
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d92e3115-6ce1-470f-a46c-0e27b69a2695

📥 Commits

Reviewing files that changed from the base of the PR and between fd856b7 and f1c47bc.


📒 Files selected for processing (4)
  • api/tinyhumans.backend.json
  • src/generated_public_routes.rs
  • src/lib_exclusion_tests.rs
  • tests/openapi_sync.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The unexposed route list now includes five admin memory GET routes. The manifest and tests update their route and excluded-operation counts to reflect these additions.

Changes

Admin memory route exclusions

Layer / File(s) Summary
Add route exclusions and update counts
src/generated_public_routes.rs, api/tinyhumans.backend.json, src/lib_exclusion_tests.rs, tests/openapi_sync.rs
The unexposed route list adds five admin memory GET routes. The manifest and tests update their related counts. The operation and supplemental operation counts remain unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: senamakel


Merge Risk

Merge Risk: ⚪ Minimal · up to f1c47

The five admin memory routes remain blocked from the raw transport, and the updated metadata and tests reflect their exclusion. No actionable merge-blocking risk remains.

Security Architecture Review

Security architecture risk: ⚪ Minimal · up to f1c47

The change adds no public operations or privileges. The five admin memory routes were already rejected by the existing admin-path rule before any authenticated request was sent; this PR makes their exclusion explicit and updates the consistency checks.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated change is confined to SDK exclusion enumeration and consistency metadata. It does not create additional request reachability or credential authority for these routes. The tenant-detail placeholder denotes a route parameter, not evidence of permission to access another tenant’s data.

Trust Boundaries and Controls

  • observed — The SDK boundary rejects listed method-and-path pairs and independently rejects paths containing an admin segment. This is a client-side surface restriction, not evidence that backend authentication or authorization has been verified.



🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: denying admin memory read routes at the raw transport layer.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the routes at night,
Five memory paths stay out of sight.
The counts now match the list in view,
The tests confirm the boundary too.
Then hops away beneath the moon.

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

@tinysweeper

tinysweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 6 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Ready for maintainer review
Priority: none
Reviewed head: f1c47bc9ef1f
Updated: 1791557912 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 1 Active findings 0
Tests 2 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 1 Pending checks/questions 0

Completeness: Complete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

The review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

No active actionable findings.

Before merge

None.

How this fits together

flowchart LR
  n0["..._api_key_request_uses_openapi_field_names"]:::impacted
  n1["path_segments_are_encoded_on_typed_routes"]:::impacted
  n2["create"]:::impacted
  n3["try_from"]:::impacted
  n4["get_feedback"]:::impacted
  n5["...ejects_the_machine_only_connections_scope"]:::impacted
  n0 -->|calls| n2
  n0 -->|tests| n2
  n1 -->|calls| n4
  n1 -->|tests| n4
  n5 -->|calls| n3
  n5 -->|tests| n3
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 4 files; 0 findings. _Code retrieval was unavailable (model: ladder embeddings returned 400 Bad Request: {"error":{"message":"unknown ladder vectors; known ladders are flash (also chat-v1, flash-v1), instant (also no-think, instant-v1), reasoning (also deepseek), max-reasoning (also max-reasoning-v1), deepseek-flash (also reasoning-v1, agentic-v1), deep (also luna), scribe, uncensored, vectors-oai3 (also embeddings-oai3-v1), vision (also vision-v1, multimodal-v1), image (also images-v1, image-v1), vi), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: error sending request for url (http://cortexdb:3141/v1/recall\)\), so this review ran without it._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: Reviewed 4 files; 0 findings. _Code retrieval was unavailable (model: ladder embeddings returned 400 Bad Request: {"error":{"message":"unknown ladder vectors; known ladders are flash (also chat-v1, flash-v1), instant (also no-think, instant-v1), reasoning (also deepseek), max-reasoning (also max-reasoning-v1), deepseek-flash (also reasoning-v1, agentic-v1), deep (also luna), scribe, uncensored, vectors-oai3 (also embeddings-oai3-v1), vision (also vision-v1, multimodal-v1), image (also images-v1, image-v1), vi), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: error sending request for url (http://cortexdb:3141/v1/recall\)\), so this review ran without it._

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: This change syncs five `GET /admin/memory/*` operations into the exclusion registry and bumps the counts in `lib_exclusion_tests.rs` and `tests/openapi_sync.rs` to match, keeping the registry, test assertions, and spec manifest consistent. The count assertions will fail if any of the new routes is dropped or the registry drifts, and no admin surface is exposed in the SDK. Looks sound and safe to merge. _Code retrieval was unavailable (model: ladder embeddings returned 400 Bad Request: {"error":{"message":"unknown ladder vectors; known ladders are flash (also chat-v1, flash-v1), instant (also no-think, instant-v1), reasoning (also deepseek), max-reasoning (also max-reasoning-v1), deepseek-flash (also reasoning-v1, agentic-v1), deep (also luna), scribe, uncensored, vectors-oai3 (also embeddings-oai3-v1), vision (also vision-v1, multimodal-v1), image (also images-v1, image-v1), vi), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: error sending request for url (http://cortexdb:3141/v1/recall\)\), so this review ran without it._

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: The change adds five admin-only `GET /admin/memory/*` routes to the raw-transport denylist and bumps the corresponding counts and tests, exactly as the description states. Counts (59→64, 47→52) are consistent with the five added routes, and no typed client method is added, matching the repo rule against admin routes in the SDK. Looks sound to merge. _Code retrieval was unavailable (model: ladder embeddings returned 400 Bad Request: {"error":{"message":"unknown ladder vectors; known ladders are flash (also chat-v1, flash-v1), instant (also no-think, instant-v1), reasoning (also deepseek), max-reasoning (also max-reasoning-v1), deepseek-flash (also reasoning-v1, agentic-v1), deep (also luna), scribe, uncensored, vectors-oai3 (also embeddings-oai3-v1), vision (also vision-v1, multimodal-v1), image (also images-v1, image-v1), vi), so this review saw the diff alone._ _Memory was unavailable (model: cortex: v1/recall: error sending request for url (http://cortexdb:3141/v1/recall\)\), so this review ran without it._

e2e

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: No end-to-end harness in this repository: no e2e test files and no e2e workflow.
Evidence and run details
  • Models: gpt-5.6-luna, glm-5.3-flash
  • Spend: $0.000870
  • Tokens: 73748 input · 4646 output · 9982 cached · 0 embedding
Head State Pass summary
f1c47bc9ef1f ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 1791557912)

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0009 · 73,748 in / 4,646 out · 9,982 cached (14%) · gpt-5.6-luna, glm-5.3-flash
critique:    $0.0005 · 38,599 in / 2,650 out · 6,152 cached (16%) · gpt-5.6-luna
security:    $0.0003 · 23,520 in / 753 out   · 3,638 cached (15%) · gpt-5.6-luna
tests:       $0.0000 · 4,455 in  / 156 out   · 64 cached (1%)     · glm-5.3-flash
description: $0.0000 · 4,158 in  / 137 out   · 64 cached (2%)     · glm-5.3-flash

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Oct 9, 2026
@CodeGhost21
CodeGhost21 merged commit f686c36 into main Oct 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant