Skip to content

Add org.hypercerts.acknowledgement lexicon - #76

Merged
aspiers merged 1 commit into
developfrom
feat/acknowledgement-lexicon
Feb 12, 2026
Merged

Add org.hypercerts.acknowledgement lexicon#76
aspiers merged 1 commit into
developfrom
feat/acknowledgement-lexicon

Conversation

@s-adamantine

@s-adamantine s-adamantine commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR introduces the org.hypercerts.acknowledgement lexicon for bidirectional linking between records across PDS repositories. It enables record owners to explicitly acknowledge (or reject) the inclusion of their records in another user's records.

Fixes #36 and #63.

Key Changes

  • New lexicon: org.hypercerts.acknowledgement — a regular record (not a sidecar) with its own TID
  • strongRef links: Uses subject and context fields (both com.atproto.repo.strongRef) to form bidirectional links across repos
  • Two primary use cases:
    • Activity owner acknowledges inclusion in another user's collection/project
    • Contributor acknowledges inclusion in another user's activity
  • README documentation: Human-centric use case descriptions with TypeScript examples (property reference is in auto-generated SCHEMAS.md)

Design

Each acknowledgement references:

  • subject: the record being included (e.g. an activity, a contributor information record)
  • context: the record it's being included in (e.g. a collection, an activity)
  • acknowledged: boolean — true to confirm, false to reject

The acknowledgement is typically created in the subject owner's repo, forming a verifiable two-way link that an AppView can check.

Example

A contributor (Bob) acknowledges inclusion in Alice's activity:

{
  "$type": "org.hypercerts.acknowledgement",
  "subject": {
    "uri": "at://did:plc:bob/org.hypercerts.claim.contributorInformation/abc123",
    "cid": "bafy..."
  },
  "context": {
    "uri": "at://did:plc:alice/org.hypercerts.claim.activity/3k2abc",
    "cid": "bafy..."
  },
  "acknowledged": true,
  "comment": "Confirming my contribution to this reforestation project",
  "createdAt": "2026-02-12T00:00:00Z"
}

@changeset-bot

changeset-bot Bot commented Jan 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3044e22

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 Jan 20, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new org.hypercerts.acknowledgement lexicon and export constant, updates schema docs and ERD to include the acknowledgement dataclass and its relationships, and adds a changeset and README usage examples. Also expands the org.hypercerts.claim.activity schema in SCHEMAS.md.

Changes

Cohort / File(s) Summary
Lexicon file
lexicons/org/hypercerts/acknowledgement.json
New lexicon file defining org.hypercerts.acknowledgement main record with required fields subject (strongRef), context (strongRef), acknowledged (boolean), createdAt (datetime) and optional comment (string, maxLength 1000).
ERD & Schemas
ERD.puml, SCHEMAS.md
Adds org.hypercerts.acknowledgement dataclass (fields: subject, context, acknowledged, comment?, createdAt) and relationships linking acknowledgement::subject → activity/contributorInformation and acknowledgement::context → collection/activity; expands org.hypercerts.claim.activity schema to a richer any key with many typed fields and nested defs.
Docs & Exports
.changeset/add-acknowledgement-lexicon.md, README.md
Adds changeset for a minor release, documents "Acknowledging Inclusion" with examples, and adds a public ACKNOWLEDGEMENT_NSID export in @hypercerts-org/lexicon used in examples.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped along to add a note,
A tiny lexicon to proudly tote,
Subject and context, a nod or nay,
A carrot-sized acknowledgement for the day 🥕

🚥 Pre-merge checks | ✅ 6 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Lexicons Styleguide Compliance ⚠️ Warning The acknowledgement.json lexicon fails to comply with AT Proto style guide requirements for StrongRef documentation and namespace consistency. Update subject and context property descriptions to explicitly document expected lexicon types, and move the lexicon to org/hypercerts/claim/acknowledgement.json to maintain namespace consistency.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change - adding the org.hypercerts.acknowledgement lexicon - which is the primary focus of the changeset.
Linked Issues check ✅ Passed The PR implements bidirectional linking through an acknowledgement/consent mechanism (#36), enabling activity-to-context associations with explicit approval, addressing the authorization concern.
Out of Scope Changes check ✅ Passed All changes are scoped to implementing the acknowledgement lexicon and updating related documentation; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Lexicon Documentation Sync ✅ Passed The pull request maintains synchronization between JSON lexicon, README.md, and ERD.puml with properly documented acknowledgement fields and valid relationships.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/acknowledgement-lexicon

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.

@s-adamantine
s-adamantine requested a review from aspiers January 20, 2026 03:06
@s-adamantine s-adamantine changed the title feat: add org.hypercerts.claim.acknowledgement lexicon Add org.hypercerts.claim.acknowledgement sidecar lexicon Jan 20, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@ERD.puml`:
- Around line 321-323: The ERD references an undefined entity: change the
invalid relation "acknowledgement::contexts --> project" to point at the correct
sidecar entity or remove it; specifically update the acknowledgement::contexts
relation to reference collectionProject if acknowledgement contexts should
target the former project sidecar, otherwise delete the
acknowledgement::contexts --> project line so acknowledgement::contexts only
links to existing entities like collection.

In `@README.md`:
- Around line 641-642: Remove the duplicate horizontal rule in README.md by
deleting one of the two consecutive '---' separators so only a single horizontal
rule remains; locate the consecutive '---' entries and remove the redundant one
to restore proper section separation.
🧹 Nitpick comments (1)
ERD.puml (1)

192-214: Consider adding sidecar relationships to collection entity for consistency.

The acknowledgement entity shows an explicit sidecar relationship to activity (line 321), but the collection sidecar entities (collectionLocation, collectionProject, collectionHyperboard) don't show their relationship to the collection entity.

For diagram clarity and consistency, consider adding dotted relationships:

collectionLocation .. collection : "sidecar (same TID)"
collectionProject .. collection : "sidecar (same TID)"
collectionHyperboard .. collection : "sidecar (same TID)"

Comment thread ERD.puml Outdated
Comment thread README.md Outdated
@s-adamantine
s-adamantine force-pushed the feat/acknowledgement-lexicon branch 3 times, most recently from 2a10d1c to 3a549bc Compare January 20, 2026 04:29

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 452-465: The README's acknowledgement sidecar text mentions
"collections or projects" but the ERD/schema only links
acknowledgement::contexts to collections; update to keep docs and schema aligned
by either (A) removing "projects" from the Sidecar Pattern and the Properties
description for the contexts field (`contexts`, `acknowledgement::contexts`) so
it only references collections, or (B) extend the ERD/schema to permit project
targets and document that change (update `acknowledgement::contexts` schema and
any ERD links to include project target type). Locate the `contexts` property
and the "Sidecar Pattern" paragraph in the README and apply the chosen
consistent change.

Comment thread README.md Outdated
@s-adamantine s-adamantine changed the title Add org.hypercerts.claim.acknowledgement sidecar lexicon Add org.hypercerts.claim.acknowledgement lexicon Jan 21, 2026
@s-adamantine
s-adamantine marked this pull request as draft January 21, 2026 00:28
@s-adamantine

Copy link
Copy Markdown
Contributor Author

Draft: needs to change from sidecar to regular lexicon

@s-adamantine
s-adamantine force-pushed the feat/acknowledgement-lexicon branch 2 times, most recently from 45f6870 to 59ed48c Compare January 21, 2026 02:56
@s-adamantine
s-adamantine marked this pull request as ready for review January 21, 2026 03:19
@s-adamantine
s-adamantine marked this pull request as draft January 21, 2026 03:20
@holkexyz holkexyz linked an issue Jan 21, 2026 that may be closed by this pull request
@aspiers
aspiers force-pushed the feat/acknowledgement-lexicon branch from a8a992d to 3044e22 Compare February 12, 2026 03:23
@aspiers
aspiers marked this pull request as ready for review February 12, 2026 03:24
Copilot AI review requested due to automatic review settings February 12, 2026 03:24
@aspiers aspiers changed the title Add org.hypercerts.claim.acknowledgement lexicon Add org.hypercerts.acknowledgement lexicon Feb 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a new Hypercerts lexicon intended to represent explicit acknowledgement/consent when one record is included/associated within another, and updates the repository documentation and release metadata accordingly.

Changes:

  • Added a new org.hypercerts.acknowledgement lexicon record for bidirectional inclusion acknowledgement.
  • Updated schema reference docs and README with acknowledgement documentation and usage examples.
  • Updated ERD and added a changeset to publish a minor release.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
lexicons/org/hypercerts/acknowledgement.json Adds the acknowledgement record schema (subject/context strongRefs, boolean acknowledgement, optional comment, createdAt).
SCHEMAS.md Adds the auto-generated schema reference entry for the new lexicon.
README.md Documents the acknowledgement concept and provides TypeScript examples.
ERD.puml Adds an acknowledgement dataclass and relationship arrows for subject/context.
.changeset/add-acknowledgement-lexicon.md Declares a minor release for the new acknowledgement lexicon.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lexicons/org/hypercerts/acknowledgement.json
Comment thread lexicons/org/hypercerts/acknowledgement.json
Comment thread README.md
Comment thread lexicons/org/hypercerts/acknowledgement.json
Comment thread .changeset/add-acknowledgement-lexicon.md
@aspiers
aspiers merged commit b7ab532 into develop Feb 12, 2026
11 checks passed
@aspiers
aspiers deleted the feat/acknowledgement-lexicon branch February 12, 2026 03:38
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.

[MAYBE] Implement consent lexicon for activity inclusion approval Linking between projects and activities

3 participants