Skip to content

Plugin manifest: optional unit on a produced role - #2359

Merged
neuromechanist merged 2 commits into
feature/issue-2324-epic-pipeline-progressfrom
feature/issue-2358-role-unit
Nov 24, 2026
Merged

neuromechanist merged 2 commits into
feature/issue-2324-epic-pipeline-progressfrom
feature/issue-2358-role-unit

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Closes #2358. Part of epic #2324 (ADR 0137).

What changed

  • ViewProducedRole in nemar.plugin-manifest.v1 gains an optional unit, in zod and in the JSON Schema identically: a string of 1 to 32 code points, the grammar and cap of a neuroschema 0.6.0 column unit (Option A of the issue).
  • A column's own unit overrides the role's unit for that column; a {"from": "recipe"} role still refuses any key but from, so it never carries a unit.
  • Whether a generic kind's role must carry a unit (a role unit or columns with units) is the nemar-process loader's check per kind (its phase P3), not this schema's.
  • The override rule is in the schema and zod descriptions, ADR 0137 decision 4 and the changelog.

Tests

  • Corpus (zod and Ajv agree on each): role unit of 32 astral code points on a role without columns (accepted), 33 (refused), empty (refused), non-string (refused), on a recipe role (refused), role unit beside column units (accepted); a test pins the role unit's JSON Schema to the column unit's.
  • plugin-manifest-vectors.json regenerated with NEMAR_WRITE_PLUGIN_VECTORS=1: six vectors added (view_role_unit_*, view_recipe_role_with_unit), none changed.
  • bun run typecheck, bun run lint
  • plugin-manifest-contract, plugin-manifest-vectors, contract-schemas, adr-index, changelog-format: 183 pass, 0 fail
  • Mutations: dropping the role unit, raising the cap to 33, allowing empty, a non-string unit, or a unit on the recipe role, each in zod and in the schema, makes at least one test fail
  • Full bun test not run (epic -> dev gate).

nemar-process

P3 re-copies shared/contract/plugin-manifest.schema.json and plugin-manifest-vectors.json from this PR's squash commit.

Agentic AI tools were used in preparing this pull request.

ViewProducedRole gains an optional unit (1 to 32 code points, the grammar of a neuroschema 0.6.0 column unit) in zod and the JSON Schema; a column's unit overrides it; a recipe role still refuses one. Corpus cases for 32/33 code points, empty, non-string, recipe role with unit, role unit beside column units; six new vectors, none changed. Tested: plugin-manifest contract and vectors; mutations M1-M9 each fail.
Records the override rule and that the per-kind unit requirement is the nemar-process loader's (#2358). Tested: adr-index, changelog-format.
@github-actions

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR2359

Version: 0.10.40-PR2359.06b8076
Commit: 06b8076


🤖 Updated on each push.

@neuromechanist

Copy link
Copy Markdown
Contributor Author

Review r1 (code, tests, comments): clean; zod and JSON Schema agree, ajv counts code points as codePoints does (checked with 32 and 33 U+1D400). CI: only the expected recipe drift failure (epic recipes b2 vs nemar-process dev b1, until the nemar-process epic reaches dev). Admin-merging into the epic branch.

@neuromechanist
neuromechanist merged commit 1788c5d into feature/issue-2324-epic-pipeline-progress Nov 24, 2026
25 of 27 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-2358-role-unit branch November 24, 2026 23:01

This branch was previously deployed

1 inactive deployment
npm — 06b8076c Deployed Nov 24, 2026 by neuromechanist via publish #4853
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