Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Add a Noema-owned exact-claim evidence receipt contract whose execution and research producers serialize one canonical artifact that binds every receipt semantic field, including command/result/isolation/network or source revision/excerpt/retrieval policy. Admission accepts only a receipt ID from untrusted model output. The owner API first verifies the exact authenticated OpenCode-handoff manifest digest, canonical envelope bytes, reviewed producer-to-kind policy, and repository/head/workflow/run/attempt identity before it can construct an immutable typed index; admission then reconstructs each canonical artifact and verifies time/claim/artifact identity. The version-2 manifest now binds a separate producer-authenticated `ClaimEvidenceRequirement` containing the exact claim, independently required evidence kind, and `context` or `finding` publication authority. Raw current-head source lines are context only: they are withheld from finding-reference prompts and cannot publish a finding or `request_changes`; an explicitly producer-authorized source finding remains usable and retains exact path/line checks. Finding-free model `request_changes` and `blocked` verdicts cannot bypass receipt admission to publish a vacuous blocking review. Requirement/receipt kind mismatch, fixed-artifact semantic substitution, caller-supplied receipt dictionaries, model self-classification, stale identities, cross-kind receipts, marker-only sandbox output, noncanonical artifact bytes, and expired receipts fail closed before the GitHub publisher. This remains the owner prerequisite for ContextualWisdomLab/.github#1641 and issue #555. The reviewed `sandboxed_verify` adapter exists in owner source, but its actual central stdout/stderr/marker-to-manifest wiring and the trusted research producer are not yet integrated; exact-head hosted GREEN, immutable release, and the verified central consumer bump remain required.

## Unreleased
- Protected #697 requires `application/json` on successful contextual-orchestrator `/healthz` responses at exact source `1e0ac2eac6d3172468c842cae957079305c33a1d`. Media-type parameters such as `charset=utf-8` remain valid, while a missing or non-JSON media type fails closed before bounded body consumption with the stable `contextual-orchestrator health response content-type is not application/json` diagnostic. Existing 65,536-byte ceiling, optional caller-supplied deadline with no invented default timeout, fixed retained buffer, best-effort cancellation, reader-lock lifecycle after successful acquisition, fatal UTF-8, duplicate-key/JSON admission, and exact orchestrator identity remain unchanged. Contextual-orchestrator service/provider/model routing, credential, outbound, quarantine/security, release/deployment, and foreign-domain authority remain with their existing owners; protected source is not an immutable release or deployed availability/p95/recovery evidence. PR #697.
- Protected #693 normalizes reader acquisition on the shared 65,536-byte external JSON response reader used by GitHub OIDC discovery, JWKS, and GitHub API responses at exact source `c23a2bcf5e79eea5f095fb3516e28397899c87c9`. If an already locked or otherwise non-stream-readable response body makes `response.body.getReader()` throw synchronously, Noema fails closed with the path-specific stable `GitHub OIDC discovery response body could not be read`, `GitHub OIDC JWKS response body could not be read`, or `GitHub API response body could not be read` diagnostic instead of misclassifying that transport failure as malformed JSON. Existing 65,536-byte ceiling, 10-second absolute deadline, fixed retained buffer, best-effort cancellation, fatal UTF-8, duplicate-key and JSON admission, and reader-lock cleanup after successful acquisition remain unchanged. OIDC/GitHub identity, provider/model routing, destination/outbound policy, credential authority, quarantine/security authority, release/deployment authority, and foreign-domain truth remain with their existing owners; protected source is not an immutable release, production deployment, recovery rehearsal, or deployed p95/heap evidence. PR #693.
- Protected #691 normalizes reader acquisition on the read-only private-vulnerability-reporting audit at exact source `65e0d3dd3c4060ba0057ba13cf6c9ea23b03373d`. If an already locked or otherwise non-stream-readable GitHub response body makes `response.body.getReader()` throw synchronously, Noema fails closed with the stable `GitHub private vulnerability reporting response body could not be read.` diagnostic. Existing 16 KiB response ceiling, JSON media-type gate, fatal UTF-8, duplicate-key and JSON admission, best-effort oversize cancellation, and reader-lock cleanup after successful acquisition remain unchanged. GitHub private-vulnerability-reporting setting, security, outbound, credential, release/deployment, and foreign-domain authority remain with their existing owners; protected source is not an immutable release, production deployment, live private-vulnerability-reporting enablement or notification staffing, recovery rehearsal, or deployed p95/heap evidence. PR #691.
- Protected #689 normalizes reader acquisition on the public `/exchange` bounded JSON request body at exact source `b838c352a7cd0f7f58a905857537a3a9675a56f2`. If an already locked or otherwise non-stream-readable body makes `request.body.getReader()` throw synchronously, Noema returns the established `400` / `ERR_VALIDATION_INPUT` / `unreadable` contract before credential egress. Existing 8,192-byte ceiling, 10-second absolute deadline, media-type and JSON admission, best-effort cancellation, and reader-lock cleanup after successful acquisition remain unchanged. Provider/model routing, destination/outbound policy, credential authority, quarantine/security authority, release/deployment authority, and foreign-domain truth remain with their existing owners; protected source is not an immutable release, production deployment, recovery rehearsal, or deployed p95/heap evidence. PR #689.
Expand Down
1 change: 1 addition & 0 deletions contracts/orchestrator-gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"healthz": {
"unauthenticated": true,
"media_type": "application/json",
"identity": {
"status": "ok",
"service": "contextual-orchestrator"
Expand Down
3 changes: 2 additions & 1 deletion docs/orchestrator-gateway-consumer-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ same module is Noema-only. Do not clone an OpenCode sidecar into naruon.
| `NOEMA_LLM_MODEL` | One routing alias. Canonical value is `orchestrator/free` (fail-closed zero-cost pool, ZDR-first). |
| `NOEMA_LLM_API_KEY` | Dedicated gateway inference token. Never an upstream provider key. |

`GET <gateway-root>/healthz` is unauthenticated and must return
`GET <gateway-root>/healthz` is unauthenticated, must respond with
`Content-Type: application/json`, and must return
`{"status":"ok","service":"contextual-orchestrator"}`.

At request time, secrets come from a KV / credential registry (the Worker
Expand Down
8 changes: 8 additions & 0 deletions docs/product-technical-gap-baseline.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,11 @@ Dated release observation for this repair (2026-09-13 KST)는 GitHub Releases 0
Protected history includes merged PR #695 exact `c9d526093e543167645383e937096fd089b337f8`. Protected #695 closes the contextual-orchestrator health response reader-acquisition gap: if a locked or otherwise non-stream-readable `/healthz` response body makes `response.body.getReader()` throw synchronously, Noema fails closed with `contextual-orchestrator health response body is not stream-readable` instead of leaking a runtime stream exception. The existing 65,536-byte ceiling, optional caller-supplied deadline with no invented default timeout, fixed retained buffer, best-effort cancellation, fatal UTF-8, duplicate-key/JSON admission, and reader-lock lifecycle after successful acquisition remain unchanged.

#695 remains protected source evidence; immutable release and deployed availability/p95/recovery evidence remain separate. #695 does not transfer contextual-orchestrator service, provider/model routing, credential, outbound, quarantine/security, release/deployment, or foreign domain authority to Noema.

## Protected contextual-orchestrator health media-type admission — merged PR #697

Protected history includes merged PR #697 exact `1e0ac2eac6d3172468c842cae957079305c33a1d`. Protected #697 closes the contextual-orchestrator health media-type admission gap: successful `/healthz` evidence must identify its representation as `application/json` before Noema consumes the bounded body, while media-type parameters such as `charset=utf-8` remain valid. Missing or non-JSON media types fail closed with the stable `contextual-orchestrator health response content-type is not application/json` diagnostic, and cancellation remains cleanup after the media-type decision.

The existing 65,536-byte ceiling, optional caller-supplied deadline with no invented default timeout, fixed retained buffer, best-effort cancellation, reader-lock lifecycle after successful acquisition, fatal UTF-8, duplicate-key/JSON admission, and exact `{ status: "ok", service: "contextual-orchestrator" }` identity remain unchanged.

#697 remains protected source evidence; immutable release and deployed availability/p95/recovery evidence remain separate. #697 does not transfer contextual-orchestrator service, provider/model routing, credential, outbound, quarantine/security, release/deployment, or foreign domain authority to Noema.
1 change: 1 addition & 0 deletions scripts/lib/orchestrator-gateway.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export function orchestratorGatewayConsumerContract() {
}),
healthz: Object.freeze({
unauthenticated: true,
media_type: "application/json",
identity: Object.freeze({
status: "ok",
service: "contextual-orchestrator",
Expand Down
59 changes: 59 additions & 0 deletions test/orchestrator-health-media-authority.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";

import {
orchestratorGatewayConsumerContract,
serializeOrchestratorGatewayConsumerContract,
} from "../scripts/lib/orchestrator-gateway.mjs";

describe("protected orchestrator health media-type documentation authority", () => {
it("records protected #697 and publishes the JSON health media contract without promoting foreign authority", () => {
const baseline = readFileSync("docs/product-technical-gap-baseline.md", "utf8");
const changelog = readFileSync("CHANGELOG.md", "utf8");
const narrative = readFileSync(
"docs/orchestrator-gateway-consumer-contract.md",
"utf8",
);
const published = readFileSync("contracts/orchestrator-gateway.json", "utf8");
const source = readFileSync("scripts/lib/orchestrator-gateway.mjs", "utf8");
const contract = orchestratorGatewayConsumerContract();

expect(baseline).toContain(
"merged PR #697 exact `1e0ac2eac6d3172468c842cae957079305c33a1d`",
);
expect(baseline).toContain(
"Protected #697 closes the contextual-orchestrator health media-type admission gap",
);
expect(baseline).toContain(
"#697 remains protected source evidence; immutable release and deployed availability/p95/recovery evidence remain separate",
);
expect(baseline).toContain(
"#697 does not transfer contextual-orchestrator service, provider/model routing, credential, outbound, quarantine/security, release/deployment, or foreign domain authority to Noema",
);

expect(changelog).toContain(
"Protected #697 requires `application/json` on successful contextual-orchestrator `/healthz` responses at exact source `1e0ac2eac6d3172468c842cae957079305c33a1d`",
);
expect(changelog).toContain("PR #697.");

expect(contract.healthz.media_type).toBe("application/json");
expect(published).toBe(serializeOrchestratorGatewayConsumerContract());
expect(narrative).toContain("`Content-Type: application/json`");

expect(source).toContain(
'"contextual-orchestrator health response content-type is not application/json"',
);
expect(source).toContain("HEALTH_BODY_LIMIT_BYTES = 65_536");

// Documentation convergence must not rewrite unrelated protected history.
expect(changelog).toContain(
"Distributed `/exchange` rate-limit의 private Durable Object request(256 bytes)와 decision response(4,096 bytes) bounded stream reader",
);
expect(baseline).toContain(
"Cross-service SQL과 mutable sibling PR dependency는 금지한다.\n\nProtected #681 exact",
);
expect(baseline).toContain(
"historical Git lineage에 남아 있다.\n\nProtected source는 durable append-only lifecycle evidence의 prerequisite",
);
});
});
Loading