Skip to content

feat: Phase I I2 JSON-LD context for evidence certificates -- JLC- prefix, OpenAMP namespace, annotate_certificate_with_context, 63 tests - #912

Merged
cschanhniem merged 1 commit into
mainfrom
feat/i2-jsonld-context
Jul 10, 2026
Merged

cschanhniem merged 1 commit into
mainfrom
feat/i2-jsonld-context

Conversation

@cschanhniem

Copy link
Copy Markdown
Collaborator

Implements I2 from NEXT_100_PR_MAP: JSON-LD context module.

What

  • src/openamp_foundry/interop/jsonld_context.py: JSON-LD context generation
  • JLC- prefix, OPENAMP_NAMESPACE=https://openamp-foundry.org/ns/v1#
  • VALID_EVIDENCE_TYPES (7), REQUIRED_CERTIFICATE_FIELDS (5), JSONLD_BASE_CONTEXT (16 terms)
  • JsonLdContextRecord (7 fields), JsonLdContextValidationResult
  • 8 validation rules: prefix, evidence_type, context_version, @vocab, namespace, required fields, is_dry_lab_constrained, generation_note
  • format_jsonld_context_record(): JSON with @context + _meta
  • annotate_certificate_with_context(): adds @context and @type to cert dict
  • 63 tests across 5 classes; BASELINE 8032→8095

Why

JSON-LD context lets partner tools consume OpenAMP evidence certificates as semantic web artifacts without custom parsers. The OPENAMP_NAMESPACE makes certificate fields globally unambiguous. The is_dry_lab_constrained gate ensures wet-lab contexts cannot be generated without human review.

Disconfirming pass

  • Wrong namespace blocked
  • Missing @vocab blocked
  • Unknown evidence_type blocked
  • is_dry_lab_constrained=False blocked
  • annotate_certificate_with_context does not mutate the original dict

…efix, OpenAMP namespace, annotate_certificate_with_context, 63 tests (#911)
@cschanhniem
cschanhniem merged commit 7ce3698 into main Jul 10, 2026
1 check failed
cschanhniem pushed a commit that referenced this pull request Jul 10, 2026
…ter with ADS- prefix, 10 target tools, dry-lab enforcement, 63 tests (#912)
cschanhniem added a commit that referenced this pull request Jul 10, 2026
…ter with ADS- prefix, 10 target tools, dry-lab enforcement, 63 tests (#912) (#913)

Co-authored-by: OpenCode <opencode@example.com>
cschanhniem added a commit that referenced this pull request Jul 10, 2026
…ter with ADS- prefix, 10 target tools, dry-lab enforcement, 63 tests (#912) (#914)

Co-authored-by: OpenCode <opencode@example.com>
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