fix(schema): x-openregister-agent-context was dropped at save — every agent leaf resolved an empty context - #2167
Merged
Conversation
…Y (or#2164) The per-schema agent-context allowlist was absent from ANNOTATION_VOCABULARY, so validateConfigurationEntry() silently dropped it on save. Because Hermiq's AgentContextBuilder (and its JS twin src/utils/agentContext.js) read exactly that key, EVERY agent leaf on EVERY schema fleet-wide resolved an EMPTY context. Fail-closed, so never a data leak — an absent allowlist means 'expose nothing' — but the capability was wholly inert, and invisible by construction: the schema saved with HTTP 200, no validation error reached the caller, and the only signal was a log line. This is the FOURTH recurrence of the same defect class in this list, after x-openregister-processing, x-openregister-contextchat and x-openregister-shareable, each of which carries its own comment saying so. Adds two regression tests (flat allowlist and the per-property refinement form) asserting both that the key survives the round-trip and that it is not reported as dropped. Verified live: PUT of an allowlist onto the hydra-cache 'finding' schema now reads back intact where it previously returned ABSENT.
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 174/174 | |||
| npm | ✅ | ✅ 555/555 | |||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-07-27 14:46 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2164.
The defect
x-openregister-agent-contextwas absent fromSchema::ANNOTATION_VOCABULARY, sovalidateConfigurationEntry()silently dropped it on save. Hermiq'sAgentContextBuilder(and its JS twinsrc/utils/agentContext.js) read exactly that key to bound what object data reaches an LLM — so every agent leaf on every schema fleet-wide resolved an empty context.Fail-closed, so never a leak: an absent allowlist means "expose nothing". But the capability was wholly inert, and invisible by construction — the schema saved with HTTP 200, no validation error reached the caller, and the only signal was a log line.
This is the fourth recurrence
The list already carries explanatory comments for
x-openregister-processing,x-openregister-contextchatandx-openregister-shareable— each added after the same bug. That pattern is worth a structural fix (a test asserting every key READ anywhere in the fleet is present in the vocabulary), which I have deliberately not bundled here; this PR stays a one-key fix plus its regression tests.Verification
Live, against the running dev instance — a PUT of an allowlist onto the
hydra-cachefindingschema:Unit:
SchemaAnnotationVocabularyTest8/8 green (2 new — flat allowlist and the per-property refinement form, each asserting the key survives the round-trip AND is not reported as dropped).Note:
tests/Unit/Db/has 7 pre-existing failures, all inSchemaLinkedTypes*(linkedTypes validation) — a different code path, untouched by this change, which adds one string to a const array.🤖 Generated with Claude Code