Skip to content

feat(registry)!: registry to decide which datasets it accepts and rejects - #828

Merged
masquare merged 11 commits into
mainfrom
feature/remote-registry-any-access
Nov 20, 2026
Merged

masquare merged 11 commits into
mainfrom
feature/remote-registry-any-access

Conversation

@masquare

@masquare masquare commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

The registry that receives data now decides whether it accepts or serves a dataset. The TimeNet client no longer checks access levels. It always tries to publish and read, and the registry answers.

  • A public registry rejects datasets that are not open.
  • A private registry can accept and serve non-open datasets for callers it knows, for example with an API key set in TIMENET_TOKEN.
  • For an s3:// registry, the bucket permissions decide.

What changes in the client:

  • requires_open_access, require_open_access() and every client access check are removed.
  • A refused read raises TimeNetAccessError with the reason that the registry gives. resolve() returns NotServed, so the lookup moves on to the next source.
  • A refused publish raises TimeNetRegistryError with the reason that the registry gives.
  • A 401 or 403 names TIMENET_TOKEN when the client sent no token.

Breaking:

  • timenet.build(open_access_only=...) is removed.
  • S3Registry holds and serves releases that are not open.
  • An access refusal no longer names the access level or the access page.

Open point: the registry service checks only the card of the release, not its lineage. So it can accept a release with an open card and a non-open ancestor. If that matters, the service needs a lineage check.

RemoteRegistry no longer refuses a release because its access is not
open. The service decides which releases a caller can read and which
releases it accepts.

- RemoteRegistry.requires_open_access is False. S3Registry keeps True,
  because a bucket has no service that checks access.
- A 403 on the manifest route becomes TimeNetAccessError with the access
  level and page of the listed card. resolve() answers NotServed, so the
  lookup still falls through to the next source.
- A 401 or 403 carries the whole reason that the service gives. A 401
  also says how to set a token.

BREAKING CHANGE: RemoteRegistry.requires_open_access changes from True
to False. For a release that the service refuses, resolve() returns
NotServed without a manifest, and TimeNet.get_manifest() raises
TimeNetAccessError.
@masquare masquare added area:core Changes packages/timenet area:connectors Changes packages/timenet-connectors breaking:api Breaks callers of the Python API or the CLI labels Nov 20, 2026
…release in dest

A caller without the right to read a gated release got an access error with build hints when the destination already held the release. The copy now goes on to the publish request, so the service gives its own reason.
…nt none

An anonymous 403 from the registry API now says how to set a token. A refusal of a token that the client sent, or of the object storage, no longer does.
…ess check

No registry client refuses a release because of its access level any more. A registry service decides what it accepts and serves. For an s3:// registry, the owner of the bucket decides through the bucket permissions.

A refusal of the service still becomes TimeNetAccessError and NotServed. A copy or a download takes a payload source that the service refuses from the destination, if the destination holds a complete copy.

BREAKING CHANGE: BaseRegistry.requires_open_access, the open_access_only option of timenet.build() and plan_release_build(), require_open_access() and NotServed.manifest are gone. An S3Registry now holds and serves releases that are not open.
@masquare masquare changed the title feat(registry)!: let the remote registry service decide access feat(registry)!: let the registry service decide access and drop the client access check Nov 20, 2026
…resolve

Drop the duplicate resolve overrides in RemoteRegistry and the test double,
share one detail fetch helper, build the 401/403 message once, and remove
the unused _GATED test constant.
@masquare masquare changed the title feat(registry)!: let the registry service decide access and drop the client access check feat(registry)!: let the destination registry accept or reject datasets Nov 20, 2026
…second lookup

A 403 on a release read becomes TimeNetAccessError with the reason that the
service gives, and resolve() answers NotServed. The client no longer fetches
the latest card to guess the access level and page. That removes an extra
request per refusal, the wrong page for an older version, and the raw 403
that escaped resolve() for a gated release with an open card.

TimeNetAccessError and NotServed take an optional access level and a reason.

BREAKING CHANGE: a refusal from a registry service no longer names the access
level or the access page.
@masquare
masquare requested a review from karhu November 20, 2026 06:52
@masquare
masquare marked this pull request as ready for review November 20, 2026 06:52
@masquare masquare changed the title feat(registry)!: let the destination registry accept or reject datasets feat(registry)!: registry to handle accept or reject datasets Nov 20, 2026
@masquare masquare changed the title feat(registry)!: registry to handle accept or reject datasets feat(registry)!: let the registry decide which datasets it accepts and serves Nov 20, 2026
@masquare masquare changed the title feat(registry)!: let the registry decide which datasets it accepts and serves feat(registry)!: registry to decide which datasets it accepts and rejects Nov 20, 2026
A writer token on the registry service can always read what it writes, so
dest never refuses a read to a caller that may write. A caller without write
access now gets the read refusal, which names TIMENET_TOKEN, instead of the
write refusal.
Comment thread docs/build.md Resolved
@masquare
masquare merged commit 140bbc5 into main Nov 20, 2026
4 checks passed
@masquare
masquare deleted the feature/remote-registry-any-access branch November 20, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:connectors Changes packages/timenet-connectors area:core Changes packages/timenet breaking:api Breaks callers of the Python API or the CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants