Skip to content

refactor: move evaluation and attachment to context namespace - #154

Merged
aspiers merged 2 commits into
developfrom
refactor/move-evaluation-attachment-to-context
Mar 1, 2026
Merged

refactor: move evaluation and attachment to context namespace#154
aspiers merged 2 commits into
developfrom
refactor/move-evaluation-attachment-to-context

Conversation

@holkexyz

@holkexyz holkexyz commented Feb 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Move org.hypercerts.claim.evaluationorg.hypercerts.context.evaluation
  • Move org.hypercerts.claim.attachmentorg.hypercerts.context.attachment
  • Update lexicon IDs, ERD.puml references, and regenerate SCHEMAS.md

Test plan

  • npm run check passes (gen-api, lint, typecheck, build, test)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor

    • Reorganized evaluation and attachment lexicon definitions to a new organizational namespace structure.
  • Chores

    • Added changeset documentation for a minor version bump to the lexicon library.

…mespace

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Feb 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5a6e619

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hypercerts-org/lexicon Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Feb 27, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32c575d and 5a6e619.

📒 Files selected for processing (5)
  • .changeset/move-evaluation-attachment-context.md
  • ERD.puml
  • SCHEMAS.md
  • lexicons/org/hypercerts/context/attachment.json
  • lexicons/org/hypercerts/context/evaluation.json

📝 Walkthrough

Walkthrough

This pull request relocates the attachment and evaluation lexicon definitions from the org.hypercerts.claim namespace to the org.hypercerts.context namespace. The changes update identifiers across declaration files, lexicon schemas, and documentation while preserving all original field structures and semantics.

Changes

Cohort / File(s) Summary
Changeset & Configuration
.changeset/move-evaluation-attachment-context.md
Documents a minor version bump for "@hypercerts-org/lexicon" recording the namespace migration of evaluation and attachment lexicons.
Lexicon Schemas
lexicons/org/hypercerts/context/attachment.json, lexicons/org/hypercerts/context/evaluation.json
Updates lexicon identifiers from org.hypercerts.claim.* to org.hypercerts.context.*; reorders score definition within evaluation defs without altering field properties.
Documentation
ERD.puml, SCHEMAS.md
Updates dataclass and lexicon entry declarations to reflect namespace changes from claim to context; maintains original field semantics and structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • aspiers
  • s-adamantine

Poem

🐰 Hopping through namespaces with glee,
From claim to context, wild and free,
Attachments and evaluations dance,
Reorganized in a new expanse,
Same structure, fresh identity!


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Lexicon Documentation Sync ❌ Error README.md lacks a Creating Evaluations section and EVALUATION_NSID import/example despite lexicon namespace changes and prior evaluation references. Add Creating Evaluations section to README.md mirroring the Creating Attachments pattern with EVALUATION_NSID import and TypeScript code example.
Lexicons Styleguide Compliance ⚠️ Warning Pull request introduces undocumented style guide deviations in lexicon files for strongRef documentation and missing maxLength constraints. Update evaluation.json subject description to document expected lexicon type and add maxLength constraints to attachment.json array fields or document deviations.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main refactoring change: moving evaluation and attachment lexicons from the claim namespace to the context namespace.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/move-evaluation-attachment-to-context

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@aspiers

aspiers commented Mar 1, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai evaluation subject is deliberately untyped since we want anything to be evaluated potentially. Also the lexicon style guide does not say anything about maxLength for arrays, only strings.

@coderabbitai

coderabbitai Bot commented Mar 1, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@aspiers, thank you for the clarification! I understand now:

  1. Untyped subject field: It makes sense to keep the evaluation subject flexible and untyped to support evaluating any kind of entity or resource.

  2. maxLength for arrays: You're correct that the lexicon style guide specifies maxLength only for string types, not for arrays.

I've noted both of these points for future reviews.


✏️ Learnings added
Learnt from: aspiers
URL: https://github.com/hypercerts-org/hypercerts-lexicon/pull/154

Timestamp: 2026-03-01T23:51:48.084Z
Learning: In org.hypercerts.context.evaluation lexicon, the subject field is deliberately untyped to allow maximum flexibility for evaluating any kind of entity or resource.

Learnt from: aspiers
URL: https://github.com/hypercerts-org/hypercerts-lexicon/pull/154

Timestamp: 2026-03-01T23:51:48.084Z
Learning: In AT Protocol lexicon JSON files, the maxLength constraint applies only to string types, not to array types, per the lexicon style guide.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: holkexyz
Repo: hypercerts-org/hypercerts-lexicon PR: 54
File: lexicons/app/certified/badge/definition.json:32-45
Timestamp: 2026-01-09T18:16:39.393Z
Learning: In lexicon JSON files, richtext facets arrays (e.g., descriptionFacets referencing app.bsky.richtext.facet) should follow the Bluesky ATProto pattern and not include maxLength constraints, as seen in app.bsky.feed.post.json and other Bluesky lexicons.

@aspiers
aspiers merged commit 2bde577 into develop Mar 1, 2026
5 checks passed
@aspiers
aspiers deleted the refactor/move-evaluation-attachment-to-context branch March 1, 2026 23:52
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.

2 participants