Skip to content

Revision 37 on tson-java's main: refusals, policy.tn, unversioned identities - #28

Merged
oobles merged 5 commits into
mainfrom
chore/revision-37
Oct 9, 2026
Merged

oobles merged 5 commits into
mainfrom
chore/revision-37

Conversation

@oobles

@oobles oobles commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Brings this project onto tson-java's main at Revision 37, through #700, and adopts what that revision added.

Built against Revision 37's main

  • SCOPE_NOT_ADMITTED is in problem.tn. A push at a position that isn't scoped is a 400, refused before anything is fetched.
  • Refusals are not verdicts: §8.2's name hygiene, §9.1's limit, and (#700) SCHEMA_NOT_PERMITTED and SCHEMA_TOO_LARGE. Their statuses are unchanged.
  • A URI atom reads to io.ltr8.net.Iri.
  • A bound class refusing a value its schema admits is BIND_MISMATCH, a 500.

The status policy follows the CLI's exit order, 70 > 78 > 69 > 1 > 75

  • The order is: bind mismatch, then gap, then a reference the sender must change, then limit, then name refusals, then violations, then the origin's failures.
  • SCHEMA_UNREACHABLE and SCHEMA_TIMEOUT answer 502/504 only when they are all that is wrong. Beside anything else the sender must fix, a retry would reach the same answer.

The validator answers the CLI's outcome

  • It returns ACCEPTED / REJECTED / UNDETERMINED in place of a conforming boolean.
  • A schema the caller didn't paste is SCHEMA_NOT_PERMITTED, and the result is REJECTED.

Deployment descriptors use the bundled policy.tn

  • A descriptor states a complete policy and runs it exactly as written. There are no partial overrides left to fall back on the library's defaults.
  • /.well-known/tson-deployment publishes the policy in force in the same shape, defaults included.

Project-owned identities drop their version

  • The new form is https://tson.io/2026/37/io/ltr8/http/<name>.tn, matching tson-java's convention.
  • The demos' example application keeps order-1.tn and order-2.tn, which is what TsonSchemaVersions routes.

UPSTREAM.md

  • Register citations are restated against Revision 37's dispositions.
  • The items #700 landed are removed.

Verified: ./gradlew build and ./gradlew javadoc pass at the head. a225c50 predates #700, so on its own it fails four tests that 633ca67 fixes.

🤖 Generated with Claude Code

oobles and others added 5 commits October 8, 2026 20:56
The sibling's Revision 37 proposal merged to main, so this project builds
against the published revision rather than the proposal branch.

- SCOPE_NOT_ADMITTED joins problem-1.tn's diagnostic_code: a scope push
  at a position that is not scoped is a resolver error, a 400, refused
  before anything is fetched.
- §8.2 name refusals and §9.1's limit are §8.1's refusals, not verdicts.
  Statuses are unchanged (400, 413); the docs, Javadoc and tests that
  called them verdicts say so.
- A rejection (a verdict or a refusal) outranks an origin's failure, so
  a body that will not be accepted is not answered 502/504 and sent
  round a retry that cannot succeed. Gaps and bind mismatches still rank
  first.
- The validator answers the tson CLI's outcome -- ACCEPTED, REJECTED or
  UNDETERMINED -- in place of a conforming boolean, and the page
  headlines it.
- A bound class refusing a value its schema admits is BIND_MISMATCH, a
  500; a URI atom reads to io.ltr8.net.Iri. Both pinned.
- UPSTREAM.md: register citations restated against Revision 37's
  dispositions; the CLI's exit 75 for a REJECTED file, and a comment on
  SPEC-FEEDBACK #1 about fetch refusals, staged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The profile at /.well-known/tson-deployment is now the policy the
processor enforces, written in the bundled policy.tn's shape -- the
shape tson policy and the CLI's report state one in -- rather than a
projection of what the descriptor said. It is complete: a part the
descriptor leaves alone appears at the library's default, so a client
needs no library's defaults to know what applies.

- deployment-1.tn imports policy.tn; acceptance_profile is
  { name  policy: policy }. restriction_level is policy.tn's, so the
  hand-written copy and its drift test go.
- The descriptor's own partial shapes are renamed identifier_override,
  token_override and limits_override, since importing policy.tn
  reserves its names. Descriptors read as before.
- TsonDeployment.profile(ProcessorPolicy inForce) takes what the
  processor enforces; Policy mirrors policy.tn, scripts named by UAX #24
  alias. compiled() goes, nothing using it.

Built against tson-java before #700; the commit after this one follows
it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream now counts SCHEMA_NOT_PERMITTED and SCHEMA_TOO_LARGE as
refusals, reports a closed source's miss (SchemaSource.ofMap) as
SCHEMA_NOT_PERMITTED, and ranks the CLI's exits 70 > 78 > 69 > 1 > 75.

- The status ranking follows that exit order: the origin's two,
  SCHEMA_UNREACHABLE and SCHEMA_TIMEOUT, rank last and answer only when
  they are all that is wrong. Beside anything the sender must change,
  the answer is that problem's 4xx, since a retry would reach the same
  refusal. REFERENCE_CODES and ORIGIN_CODES replace FETCH_RANKING and the
  rejects() special case. This reverses "a mixed failure is never
  blamed on the client".
- The ofMap pin expects NOT_PERMITTED. The validator reports a schema
  the caller did not paste as SCHEMA_NOT_PERMITTED, REJECTED; the page's
  caution set drops the two fetch refusals.
- problem-1.tn, CLAUDE.md and the Javadoc follow. UPSTREAM.md drops the
  two items #700 landed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A project-owned identity is https://tson.io/2026/37/io/ltr8/http/<name>.tn
-- io/ltr8 the publisher, no version in the name. Nothing here is
published, so a schema is edited in place under the one identity it has,
and a release fixes it; a shape change after that is a new identity
beside the old, which TsonProblemSchema.publishedSources() already
serves.

- problem, deployment and meta-http, and the meta-service experiment's
  meta-service, rpc, agent and agent-vm, drop their -1 and move under
  io/ltr8/http/, files and constants with them.
- The validator demo's own descriptor becomes validator-deployment.tn,
  so it is not one name away from the schema governing it.
- The demos' example application under schemas.example.com keeps its
  numbered names: order-1 beside order-2 is what TsonSchemaVersions
  routes.
- CLAUDE.md, the schemas' docs and one test message stop spelling a next
  version as -2.tn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The descriptor's policy is policy.tn's policy, every part required, and
it is applied exactly as written: deployment is { name  listener?
policy?: policy  schema_hosts? }. The partial override shapes go. A
default is the library's to move, and a security setting whose effect
shifts under an upgrade with no diff to the descriptor is the silent
relaxation §8.2 exists to prevent. No policy still leaves the library's
defaults alone.

- TsonDeployment.Policy.toProcessorPolicy() builds the library's value;
  applyTo hands it whole to ProcessorConfig.withProcessorPolicy, and
  processorPolicy() replaces the three per-part accessors.
- Script names are canonicalised to their UAX #24 long alias, sorted per
  combination, and one that is not a script stops the read. A descriptor
  naming a Unicode data version this processor does not carry stops it
  too.
- The validator's descriptor writes its whole policy out, the two
  default parts included; what it publishes is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oobles
oobles merged commit f20a34d into main Oct 9, 2026
1 check passed
@oobles
oobles deleted the chore/revision-37 branch October 9, 2026 01:22
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