Skip to content

feat(api,access,mcp): share Profile maintenance, expose Scope query and cross-Scope query - #3

Closed
PsiACE wants to merge 32 commits into
scope-sharing/base-2611from
scope-sharing/2611-g-api
Closed

PsiACE wants to merge 32 commits into
scope-sharing/base-2611from
scope-sharing/2611-g-api

Conversation

@PsiACE

@PsiACE PsiACE commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Which issue or RFC does this PR close?

Implements part of the Scope sharing and processing proposal in oceanbase#2611 (component work package G: public entry points and generated contracts). Includes work package E's accepted runtime as an explicit dependency.

Rationale for this change

Three gaps, each closed by reusing what already exists rather than adding a parallel path.

MCP reachability. An MCP agent could not query an authorized Scope's Artifacts or resolve an operational range. Both operations already exist over HTTP with full Access enforcement; this projects them into the agent-facing catalog. Lifecycle operations stay out of MCP because a host approval hint is not an authorization boundary.

Shared Profile maintenance. A project Profile is maintained by several people, but no existing grant expresses "may write this Artifact without owning or disclosing it": scope.admin and scope.reviewer grant no artifact.write, artifact.viewer is read-only, and artifact.owner is single, system-managed, and would transfer ownership. One artifact-level role is added, granted only for the profile Family, carrying read and write but neither share nor ownership. Candidate approval already requires current write authority on the Candidate target in the review domain, so a reviewer without the binding still cannot publish an owner-authored Profile proposal; the role makes that gate satisfiable rather than adding a second check.

Cross-Scope query. Aggregating one Family across several authorized Scopes was only possible in process. One route now publishes the runtime query that already enforces per-origin authorization, honest coverage, and the candidate budget. The origin list stays the caller's explicit declaration in its own order, because that order is the merge tie break. Opening a hit reuses the existing exact-revision read, which rechecks access at that address and never falls back to the current head, so no hit store, token, or copy is introduced.

What changes are included in this PR?

  • Dependency, kept separate for integration: E's accepted range ad0d02061..20be0c2d3 is included as its own four commits (E's own subjects). The cumulative diff is byte-identical to E's accepted state, so E's PR can be integrated once and this surface separately with no double patch.
  • search_artifacts and resolve_scope_selection exposed as read-only MCP tools; MCP guidance states their real limits.
  • AccessRole gains artifact.maintainer with actions {artifact.read, artifact.write}, artifact resource type, {user, service} subjects, many bindings per resource, grantable on profile only. Grant creation reuses the unchanged authorization path.
  • POST /v1/scopes/{scope_id}/artifacts/search:cross-scope (search_cross_scope_artifacts): Family-owned payload forwarded unchanged, explicit ordered scopes, limit/max_scopes/max_candidates budgets, coverage complete-or-partial, restrict_to refused. Response carries each hit's full origin address, origin_rank, and coverage detail. The Server derives the search execution context from the authenticated request only; no payload can assert a principal, access decision, or trusted-local standing.
  • Two new 422 codes: cross_scope_query_bounds, cross_scope_query_not_supported.
  • Generated artifacts regenerated by the generators only (make api-generate, make js-api-generate, pnpm --dir desktop generate). The Desktop contract digest moved as a result.

Are there any user-facing changes?

Additive. MCP hosts gain three read-only tools. Administrators can grant artifact.maintainer on a Profile for shared maintenance without ownership transfer. Callers gain one cross-Scope query route. Existing single-Scope search, its contract, and all existing routes, fields, error codes, and defaults are unchanged. No production grants or permission changes.

How was this change tested?

Executed in the development worktree, real ASGI + SQLite + enforced Access:

  • uv run pytest tests/e2e/test_cross_scope_query_surface.py -q -> 2 passed (new, HTTP/SDK and MCP).
  • uv run pytest tests/e2e/test_cross_scope_query.py -q -> 2 passed (E's own scenario on this branch).
  • uv run pytest tests/e2e/test_access_control_http.py tests/e2e/test_mcp_scope_sharing_surface.py -q -> 25 passed.
  • uv run pytest tests/e2e/test_mcp_transport.py -q -> 6 passed.
  • uv run pytest tests/test_api_contract.py tests/test_js_operations.py -q -> 65 passed.
  • generate_api.py --check and generate_js_operations.py --check -> exit 0.
  • ruff check, ruff format --check, ty check -> clean.
  • Non-vacuity: inverting the partial-coverage assertion fails the scenario; the maintainer and approval scenarios likewise fail when their expected denials are inverted.

Known gap, not waived. make contract-test is NOT green: 68 passed, 1 failed. tests/test_desktop_contract.py::test_bundled_desktop_contract_has_a_qualified_business_profile fails because the contract digest moved and no compatibility.json entry carries the new digest. Generated Desktop files are current; the other Desktop contract tests pass. Satisfying this needs real native-harness evidence (built wheel, Tauri/Rust build, isolated Server probe) and should be done once the whole G public contract stabilizes. No profile, digest, or artifactSha256 was fabricated or copied, and historical records for earlier digests were left untouched.

Not exercised: deployed or remote-Server acceptance, OceanBase/seekdb for these routes, and a live external host consuming the regenerated catalog. No deployment was performed.

AI usage statement

AI-assisted: implemented and reviewed with Claude-family agents (magpie group, deepseek-flash) under human orchestration. All commands listed above were executed in the development worktree.

An MCP host could not query an authorized Scope's Artifacts or resolve an
operational range, so the query-and-open path the Scope sharing proposal
depends on was unreachable from the transport most agents use. Both
operations already exist with full Access enforcement; this only projects
them into the agent-facing catalog.

MCP guidance states the real limits: a query covers one named Scope and
never its structural children or Context References, a hit opens through
the exact-revision read, and a resolved descriptor is navigation rather
than authority to read that Scope.
…ofiles

A project Profile is maintained by several people, but no existing grant
expresses "may write this Artifact without owning or disclosing it".
scope.admin and scope.reviewer grant no artifact.write, artifact.viewer is
read-only, and artifact.owner is single, system-managed, and would transfer
ownership. So a second maintainer could read the Profile and review proposals
but never write it.

Add one artifact-level role, granted only for the profile Family: it carries
artifact.read and artifact.write, permits many bindings, and accepts user and
service subjects. It confers neither artifact.share nor ownership, so the
original owner keeps the Profile and no existing grant changes meaning.
Creating it uses the unchanged grant-management authority.

Candidate approval already requires current write authority on the Candidate
target in the review domain, so a reviewer without this binding still cannot
publish an owner-authored Profile proposal; the role makes that gate
satisfiable rather than adding a second check.
@PsiACE PsiACE changed the title feat(mcp): expose bounded Artifact query and Scope range resolution feat(access,mcp): share Profile maintenance and expose Scope query over MCP Nov 16, 2026
…dback

Aggregate the existing Family searchers over an explicit origin list. Each
actual origin is authorized for `scope.read` before its own searcher runs, so
local search behavior, request validation, and result contracts are unchanged.

Identity is the origin address, not a local ID or digest: the same Artifact ID
published in two Scopes stays two distinct hits. Merging uses each origin's own
rank with the declared origin order as the stable tie break, because scores from
different indexes are not comparable.

Coverage is explicit. Complete mode propagates a required origin failure; partial
mode returns only authorized hits and reports the failed origins. A candidate
budget narrower than the caller's own per-origin limit is rejected as complete
and reported as bounded in partial mode, never presented as a full search.

Open is a separate exact-revision read: it rechecks the origin's current
permission and never falls back to the current head, so a hit keeps naming its
source revision after the source publishes a new one. Item/revision-restricted
search is refused because the approved-head projection indexes only current
revisions, so candidates cannot be restricted before scoring.
…any origin

A candidate budget narrower than the caller's own per-origin window makes the
range unsearchable to completion. Refuse it up front in complete mode instead of
spending every origin search first, and keep the partial-mode report naming the
bounded origins.
…work request

The allocated window was written into `payload.limit`, which replaced the caller's
own Family window instead of bounding it. A generous allocation could therefore
widen a declared top-1 request to two hits, and could send a limit above the
Family's own ceiling, turning a valid request into a validation error.

Cap the declared window instead: an omitted window stays omitted so the Family
keeps owning its default, a declared window is only ever lowered, and an
allocation that does not narrow it leaves the payload untouched. Coverage flags
bounded origins only when a declared window was actually narrowed.

Narrow partial-mode degradation to origin-scoped unavailability so a malformed
or unsupported common request keeps propagating as its owning boundary reports
it. Preserve the declared origin order as the documented merge tie break.
…ayload field

Reading an omitted `payload.limit` as "unbounded" dropped budget enforcement entirely:
with the Family default of 10, an allocation of 1 was never sent, so the Family could
materialize 10 hits under a declared total of 1. Reading only a declared integer also
let a clamp erase an invalid original, since `limit=201` was replaced before the
Family could reject it.

Decode the caller's original payload with the registered Family request model first,
then cap its effective window — explicit or default — by the allocation. Validation
now happens on what the caller actually sent, so a Family default, a Family-specific
field, and an out-of-range value all stay that Family's own contract and no caller
rewrites the limit before it is admitted.

The parse capability lives in the existing `_SearcherBinding` that already owns
`request_type`, exposed through `ArtifactSearchService.parse_request`, so no second
parser, registry, or request wrapper is introduced.

Also classify a real per-origin `ArtifactSearchUnavailable` as a coverage gap, since
partial mode promises a reported gap for an origin that cannot serve its projection,
and keep malformed or unsupported common requests propagating as their owner reported.
A caller could aggregate one Artifact Family across several authorized Scopes
only in process. Publish the runtime query that already enforces per-origin
authorization, coverage, and the candidate budget, without adding a second
retrieval path: one route that forwards the Family's own search fields
unchanged and reports each hit's complete origin address plus honest coverage.

The origin list stays the caller's explicit declaration, in its own order,
because that order is the merge tie break. Opening a hit reuses the existing
exact-revision read, which already rechecks access at that address and never
falls back to the current head, so no hit store or token is introduced.

Exact readback and per-origin authorization remain the runtime's; the
transport only derives the invocation context from the authenticated request,
so no payload can assert a principal, an access decision, or trusted-local
standing.
@PsiACE PsiACE changed the title feat(access,mcp): share Profile maintenance and expose Scope query over MCP feat(api,access,mcp): share Profile maintenance, expose Scope query and cross-Scope query Nov 16, 2026
The approval scenario annotated its app factory with a bare `tuple` and
passed the generated wire AccessAction to the runtime Access check, which
expects the domain enum. Both are real diagnostics under `ty check`, not
noise to suppress: the factory returns a FastAPI app and a token, and the
runtime call consumes the domain action while the wire enum stays in use for
HTTP payloads.
Admit cross-Scope Dream evidence through an explicit ScopedEvidence selection
and resolve it inside the Scope that owns it, so equal local Source or Artifact
identities in different Scopes stay distinct inputs with exact origins.

A local run is unchanged: scoped, origin_scope_id and the root-group Scope are
omitted when empty, so existing request digests, pinned manifests and readback
keep their exact bytes and wire shape.
Review 1 showed the first slice admitted another Scope's Source body into the
Dream projection on read authority and could commit a conclusion whose lineage
omitted that origin. Read on the origin plus write on the target is not an
agreement to use the material, and Candidate evidence plus Artifact lineage
still hold only Scope-local references, so the external mode is refused at
admission: before the request lookup, queue writes, body reads and generation.

The resolver keeps a separate authorize_use hook that denies when unwired, so
agreed use comes from the Access boundary that owns it rather than being
inferred from read, a reference, or an equal identity.

Also counts scoped selections inside the published 32-reference and 20-Artifact
budgets, removes the unread role field, and keeps local request digests,
serialization and manifest readback byte-identical.
…ifact

A run persisted by the intermediate head carried a role on ScopedEvidence that
never affected admission or projection. Dropping the field made that row
undecodable, and because the run selector decodes payloads while choosing the
next run, one such row starved the Scope's later local work and broke list/get.

Known stored shapes are now normalized on read: a stored role is dropped before
validation, while any other unknown field or role value still fails, so no
payload gains a new meaning. The field is not restored as public input.

The 20-Artifact promise now counts a scoped Artifact in any Scope together with
local Artifacts, and the 32-reference total still counts every selection after
all fields validate, so a qualified selection cannot exceed a published budget
that an unqualified one refuses.
A run may name its own Scope as the owner of an explicitly admitted reference.
That record is pinned with a scoped entry and a per-node and per-group origin,
so a run the runtime already accepted failed its own HTTP readback: the wire
manifest rejected the scoped field outright, which broke get and list even
though the SDK and runtime held the run correctly.

The response contract now carries what the run actually stored: the scoped
selection with its unqualified reference and owning Scope, plus the node and
group origins. An ordinary local run still omits scoped entirely, so its exact
shape is unchanged, and the HTTP create contract still exposes no scoped field,
so a foreign selection stays refused before any model runs.

The generator gains a declared omit-if-empty option because OpenAPI cannot
express output omission and this absence is part of the stored record.
A local node and root group deliberately carry no origin Scope, so the domain
omits those fields. The generated models emitted them as null instead, which
changed the response every ordinary local run already had: an existing client
reading the manifest saw keys the record never contained.

The omission is now declared per field and per model with a stated predicate,
applied to the generated Field so no other constraint moves. A global
null-stripping serializer was rejected: a scoped selection legitimately stores
its unset other address as null, and that null is part of the record.

The readback tests now assert actual key absence rather than comparing against
null, and cover the SDK read path as well as raw HTTP.
A revision produced from another Scope's evidence now carries an exact recorded
origin: the owning Scope, the unqualified reference with its locator or exact
revision, and the digest observed when it was admitted. The relation is additive
and has no foreign key to the origin row, so removing an origin later leaves an
independently retained conclusion and its provenance intact.

A Candidate binds the full admitted origin set in its versioned proposal
envelope, not only the citations the proposal names, so a proposal cannot narrow
what approval has to keep rechecking by citing less. Approval writes that set
into the committed revision's lineage, and readback returns it in ordinal order.

Local revisions are unchanged: origins are omitted when empty, so existing
lineage and Candidate payloads keep their exact bytes. An origin naming the run
Scope is refused as a local reference, duplicate origins are refused, and equal
digests are never merged or treated as a shared original.

The relation is added by a startup convergence step, like the existing additive
column migration, so a managed database whose revision chain predates it is not
asked to cover it; registering one additive managed revision with its fingerprint
and MySQL layout is left to integration, and no frozen revision was edited.
Three defects in the origin relation, all found on the public persistence path.

Portable export and restore silently dropped a committed revision's origins: the
relation was never added to the closed record set, so the archive carried the
pending Candidate's origins but not the committed lineage's. It is now a record
like the other lineage relations, with payload validation for its kind, revision
and locator, so a restore of the exact origin set succeeds or refuses rather than
quietly narrowing history.

The relation's columns were narrower than the values the model accepts. A
prefixed sha256 digest is 71 characters and a Source id may be 256, but the table
declared 64 and an Artifact-sized 128, which non-STRICT SQLite hid and a managed
backend would reject or truncate into an unreadable row. Both columns now match
the model and the sibling Source relations.

A database whose revision chain predates the relation could accept a Candidate
with origins and then fail at INSERT naming a table. An origin-bearing write now
refuses with a domain error before touching storage, while local records,
reads and the pending Candidate stay usable, and export simply finds no origins
to carry.

Recorded origins remain target-owned and address-only: still no foreign key to
the origin row, so a conclusion and its provenance outlive the origin.
Two archive-boundary defects in the recorded-origin repair.

A valid origin-bearing bundle was accepted by the dry run and then failed inside
the restore with a raw driver error naming the relation, because the target scan
skipped any record whose table was absent. Missing storage for recorded origins
is now a reported capability gap: the dry run returns compatible false with
missing_capabilities naming it, and restore refuses with the domain error before
any write. Origin-free archives still restore onto that target unchanged.

The archive also accepted origin payloads its own reader cannot decode, leaving
authoritative rows that validate refused to repair. The record is now rebuilt as
the domain value the read path constructs, so a malformed digest, a blank origin
Scope, a kind and revision that disagree, a locator on an Artifact origin, or an
Artifact id wider than an Artifact allows is refused before acceptance. Legal
maxima stay legal: a 256-character Source id, a 128-character Artifact id, a
71-character digest and a Source locator all archive and restore exactly.

Both are input-boundary refusals with no partial target state, and the guard
fixture comment now says the absent storage is simulated rather than a real
managed upgrade.
Two regressions from the archive-boundary repair.

A target with no domain schema was reported incompatible because the absent
origin relation looked like a capability gap. Restore on that same target
initializes the schema and succeeds, so the dry run contradicted the build it
ships with. Missing origin storage is now reported only when the target already
holds the domain schema, where an upgrade really is the remedy; a fresh target
is the fresh case, and its dry run stays write-free.

A malformed origin kind crashed validation instead of being refused: the raw
value was used as a set element, so a JSON array or object raised TypeError and
the CLI exited 1 with a traceback. Its type is now checked first, so every
malformed payload is the same body-free format refusal the CLI already reports.

Both are local to the archive path; accepted round trips, widths, ordinal order,
the commit guard and the external Dream refusal are unchanged.
The accepted foundation persists the full admitted origin set on a Candidate
and on the committed revision, keyed by Scope so equal local ids stay two
origins. No public read surface promises those addresses yet, and publishing
them is a disclosure decision that belongs with per-origin authority rather
than a contract edit.

So this pins the boundary instead: the origins are recorded and read back
exactly from persistence, while the Candidate, revision, and create payloads
keep their existing shapes and never gain an origin key. That keeps the
contract honest about what it promises and catches both a future leak and a
deserialization break in the direction the earlier Dream manifest failed.
The search mapper serialized the whole decoded lineage. Once the runtime began
recording admitted origins, a hit started carrying other Scopes' identifiers,
exact references and content digests to any reader who could search the target
Scope, even when that reader could not read those origins. The published
contract never promised that set.

The mapper now projects lineage to the keys the response always published, so
the hit keeps its content and direct evidence while the recorded origins stay
internal. Domain serialization is unchanged, so archive and internal lineage
readback still carry them. Verified against the prior head: the projected bytes
are identical to what was published before origins existed.
The readback guard excludes the disclosure boundary rather than implying every
public surface keeps its shape. Search decodes origins and is now covered by
test_origin_disclosure_boundary.py.
A Scope with no Profile had no reviewed way to get one: revise_profile requires a
target and its approval path requires an existing head, while manual Artifact
Create writes a revision with no Candidate or approval at all.

initialize_profile is one operation beside the existing ones. It is admitted only
while the Scope has no Profile head, takes no target, and admits the same local
evidence the revision operation already accepts, including a Sources-only
selection. Review is unchanged: a run proposes a Profile Candidate under the
Scope policy, and only approval commits, creating the ordinary authoritative
profile identity at revision one with generation mode
initialize_review_approved and the Dream run id recorded.

Absence of a baseline is rechecked at admission, generation policy and commit, so
an existing Profile is never overwritten, a repeated idempotency key replays the
accepted run, and a retry after commit is refused instead of applying twice. The
existing revision flow, local lineage and digests are untouched.

Foreign Scoped evidence stays refused; a later phase adds it to this same
operation once agreed use is accepted.
Attestation: the commit path built the Candidate family from a copied
operation-to-family map that omitted the new operation, so under enforced access
every initialization died with a KeyError before any owner was recorded. The
family now comes from the operation spec that already declares it, so no future
operation can be left out of attestation.

Dashboard and compatibility: the committed generation mode had no localized
label, so the Profile page failed to render in both locales, and the legacy
projection signalled an upgrade only for the sibling Dream mode, letting an old
client decode a mode outside its closed enum. Both now treat every
Dream-reviewed mode alike.

Bounds: an initialization that selected only scoped Artifacts skipped the
published twenty-Artifact bound. It is now exempt from the emptiness rule only,
so Sources-only initialization still works while both published caps apply.

Policy: initialization was admitted and billed before discovering the Scope has
no Profile policy. It now refuses at preflight like the revision operation, with
no implicit policy creation.
A Dream-capable Server could not start: the runtime offered
initialize_profile while the generated capability enum still listed only the
nine earlier operations, so building the capability payload raised a
ValidationError. The request enum had the same gap, so HTTP could not accept
the operation either.

One enum value closes both, because the capability object and the run request
share DreamOperation. The runtime, its admission rules, the Sources-only
shape, the target refusal and the reviewed commit are unchanged; this only
makes them reachable through the published contract. Both generated artifacts
and the embedded Desktop contract are regenerated by their own generators.
The target Scope returns more than one hit, and the committed revision that
carries the origin set is not necessarily the first, so asserting on a fixed
position let the HTTP leg pass against the leaking mapper. It now checks every
hit and the serialized result set, which fails on the leaking build without
the SDK assertion being involved.

The inherited readback test also needed formatting; no source changed.
…anch

C's accepted internal archive/delete/recovery foundation (0b0286b) predates
this branch's public surfaces, so it is reconciled here once rather than
cherry-picked: the lifecycle-only modules arrive whole, and the shared files
take C's additive hunks while keeping this branch's recorded-origin storage and
public routes intact.

Preserved from C: the archive/reopen transitions, the bounded structural
resolver, confirmed deletion with a membership digest and immediate cutoff,
per-member resource progress with resumable cleanup and supported coverage
repair, the writable gates on Artifact, Candidate, tag and Source writes, the
deleting-Scope serving boundary, portable lifecycle state with a stated
historical interpretation for older bundles, and publication refusing a
deleting source.

No public wire yet: this commit is the domain dependency only.
The lifecycle rules are the domain's; this exposes them. A Scope descriptor
now reports its own lifecycle state, archive and reopen are revision-conditional
transitions of the named Scope, and deletion is the domain's three steps:
a bounded preview that returns the exact structural set and its digest, a
confirmation that re-resolves and refuses a set that moved before cutting
access, and a durable operation whose per-resource progress is readable and
whose cleanup a manager can resume.

Every confirmed member must be currently manageable, checked at preview and
again at confirmation; a preview grants nothing, and no new role or implicit
write is introduced. The node and depth budget stays owned by the composed
application rather than becoming a per-request knob, so an over-budget preview
is refused instead of truncated.

Archive stops writes in the named Scope only: children keep their state and
authorized external reads continue. The cutoff that follows a confirmed
deletion removes the Scope from ordinary reads and writes, while failed cleanup
stays unavailable and retryable.

Reading an operation whose members are already gone needs deployment
observation, because this release records no separate requester; that gap is
stated rather than papered over.
…erations

The published contract moved after the previous Desktop generation, so the
checked-in identity was stale. Generated by the repository generator.
The B agreed-use consumer foundation and F's foreign Dream phase land as a
dependency layer on top of the reconciled C lifecycle baseline. Confirmed
single-source reconciliation: B's ScopeRange types and limits were already
present via C, so only the sharing domain, tables, authorization hooks and
runtime composition arrive; F's phase model adds the pinned share_run binding
and its persist/approval rechecks, and the tests-only delta through F head is
included verbatim. C's migration tests, operator docs and release data are
restored so the repo's own migration and release gates pass.
The accepted lifecycle foundation changed its destructive calls to take the
authenticated requester and an authorization callback, so the transport now
supplies both on confirm, status, cleanup and coverage repair. Supplying them is
required rather than optional: the composed application declares itself
trusted-local, so omitting them on an enforced request would take the in-process
path instead of checking current authority on every confirmed member. The
receipt's requester attestation is domain-internal and stays out of the published
shape.

The foreign Dream binding is published as the request fields it actually is:
scoped names the admitted evidence with its owning Scope, and share_run_id binds
the request to one pinned agreement. An unbound or mismatched claim is refused
with a stable code before any work, and the run's published shape claims no
readback this release does not provide.

Covered over the real Server: a scope-only manager can read and resume, a partial
member manager and a server observer cannot, and the foreign first-Profile path
runs from an admitted origin through Candidate to profile@1 with the origin
recorded as provenance rather than a local Source.
C replaced the boolean trusted-local flag with a construction-only embedding
identity, so trust is a property of the composition rather than something a
call can assert. Exactly one of requester or authorize is now always refused,
both absent is permitted only for an explicit embedding that records no
requester at all, and terminal readback resolves the exact operation it loaded
instead of matching a member row.

The transport already supplies the authenticated principal and a real authority
check on every confirm, status, cleanup and repair call, so enforced HTTP keeps
its per-member gate; the embedding path is not authority. The state gate is
per-invocation, so a revoked grant stops the next call or retry rather than
interrupting handlers mid-flight.
The rule engine already owned versioned rules, authenticated acceptance,
bounded discovery, pinned runs and retry; only the public entry point was
missing. This publishes that surface over HTTP and the SDK, with no second
engine and no invented coverage.

A caller cannot name the actor of an acceptance or claim coverage it does not
hold: the recorded identity is the authenticated principal and the access
boundary decides what it may cover before any row is written. A run pins the
material that currently exists, a repeated notification returns the recorded
evaluation, and a retry reuses the pinned manifest.

Reading a run withholds each origin's identity, reference and digest unless the
caller currently holds authority there, and the run's origin list and watermarks
follow the same rule, so acceptance existing is never by itself permission to
read another Scope's material.
The allowed branch of the run projection kept the domain input as-is, so it
carried internal materialization detail the wire forbids and omitted the
withholding flag the wire requires. Any caller who could actually read an origin
therefore got HTTP 422 on pin, get, list and retry, which is the one case the
projection exists to serve.

One helper now produces both forms: the allowed form keeps the exact origin
identity, reference and digest and never publishes materialization, while the
withheld form keeps only the count, kind and role. The run's origin list,
watermarks and retained addresses follow the same authority, so a reader's
partial view stays coherent across all four routes.

The regression covers a target reader who holds current read at exactly one of
two origins, which is the mixed case, and keeps the existing target-only
withholding. Origin management is not target management: the origin's own
administrator is refused pinning but keeps the released view.
@PsiACE

PsiACE commented Nov 17, 2026

Copy link
Copy Markdown
Owner Author

Closing this component/prototype PR under the RFC oceanbase#2611 scope cleanup. It is not a merge target in the retained integration stack. The branch and all commits are retained as source material; any required behavior must be extracted once into the minimal, master-based architecture rather than merged as an additional parallel implementation. This closure does not discard the ongoing bounded correctness work, approve the current architecture, or authorize reopening/expanding the stack.

@PsiACE PsiACE closed this Nov 17, 2026
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