Skip to content

labeler: target quality labels at actor DIDs - #4

Merged
Kzoeps merged 3 commits into
mainfrom
did-label-subjects
Jun 25, 2026
Merged

labeler: target quality labels at actor DIDs#4
Kzoeps merged 3 commits into
mainfrom
did-label-subjects

Conversation

@Kzoeps

@Kzoeps Kzoeps commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • apply quality labels to actor DIDs instead of organization record URIs
  • negate legacy record-level quality labels during recompute, startup sync, and delete cleanup
  • update HF reclassification and docs for DID label subjects

Testing

  • npm test
  • npm run build
  • isolated local smoke verified DID label creation and record URI label negation with temp DBs

Summary by CodeRabbit

  • New Features
    • Quality labels now consistently attach to actor DIDs, including update/reclassification flows and improved lifecycle handling.
  • Bug Fixes
    • Pending delete handling is more precise, preventing premature label negation when a delete was superseded.
    • Startup now cleans up stale legacy labels to avoid leaving incorrect quality tiers behind.
  • Documentation
    • Updated product and architecture docs to clarify DID-based labeling and label lifecycle semantics.
    • Removed an outdated tap worker plan document.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 47a69a73-155a-44e0-9538-1e98b39e52e4

📥 Commits

Reviewing files that changed from the base of the PR and between 0c754f1 and 0da223f.

📒 Files selected for processing (8)
  • README.md
  • docs/tap-worker-architecture.html
  • docs/tap-worker-plan.md
  • docs/test-pds-option-2-design.html
  • src/labeler/server.ts
  • src/labeler/start.ts
  • src/labeler/tap-consumer.ts
  • src/lib/hf-classifier.ts
💤 Files with no reviewable changes (3)
  • docs/tap-worker-plan.md
  • docs/test-pds-option-2-design.html
  • docs/tap-worker-architecture.html
✅ Files skipped from review due to trivial changes (1)
  • README.md

📝 Walkthrough

Walkthrough

The PR changes quality labels to target actor DIDs instead of organization record URIs, updates startup and TAP consumer flows to apply and clean labels by subject, adds pending-delete matching for record cleanup, and rewrites the README and docs to match the new labeling model.

Changes

Actor DID label migration

Layer / File(s) Summary
Callback contract and delete match check
src/lib/hf-classifier.ts, src/lib/db.ts, src/lib/types.ts, tests/pending-organization-deletes.test.ts
setReclassifyCallback now passes DID, the pending-delete helper matches DID/rkey/record URI, the activity log comment clarifies DID targeting, and the tests cover the exact-match predicate.
Subject-based server helpers
src/labeler/server.ts
fetchCurrentLabels now takes subjectUri, and the single-subject apply/negate helpers keep per-subject locking while using the new subject naming.
Startup reclassification and cleanup
src/labeler/start.ts
Startup wires the new callback shape, applies the new tier through an async callback, and removes the one-time stale-label negation step.
Tap consumer DID reconciliation
src/labeler/tap-consumer.ts
The tap consumer fetches and applies labels by DID, checks pending deletes before negation, and updates sync logging to use DID-based framing.
Documentation wording
README.md, src/app/docs/page.tsx
README and app docs rephrase label publication and integration text around actor DIDs, subject DIDs, and stale local state cleanup.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 I hopped through DIDs and labels bright,
The record URIs faded out of sight.
Cleanup nibbled the stale tags away,
Tap and server kept the rhythm in play,
And actor signals now shine all night ✨


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

@railway-app
railway-app Bot temporarily deployed to orglabeler / test June 25, 2026 12:13 Inactive
@railway-app
railway-app Bot temporarily deployed to orglabeler / test June 25, 2026 19:58 Inactive
@Kzoeps
Kzoeps merged commit 8d430fd into main Jun 25, 2026
2 of 3 checks passed
@Kzoeps
Kzoeps deleted the did-label-subjects branch June 25, 2026 20:13
@sonarqubecloud

Copy link
Copy Markdown

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