Repository navigation
feat(hcs-25): add ans-trust-discovery adapter - #1
Closed
chou-godaddy wants to merge 1 commit into
Closed
chou-godaddy wants to merge 1 commit into
chou-godaddy wants to merge 1 commit into
Conversation
Implements the ans-trust-discovery adapter and signal family documented in the HCS-25 specification (adapters/ans-trust-discovery.md and signals/ans-trust-discovery.md). - Passes through the eight ANS Trust Index signals stored under metadata.ansTrustDiscovery (certtype, dnssecurity, agentage, versionstability, dnsconsistency, httpsrecord, agentcard, certificatehygiene) as one component each. Null or absent signals are excluded from the adapter mean. - Scoped to registry=ans with weight 1 and default component key ans-trust-discovery.certtype, per the specification. - A stored ansTrustDiscoveryStatus of stale applies the stale multiplier. - Adds the stored-field schema and HCS25_SIGNAL_CATALOG entry, registers the adapter in createHcs25AdapterCatalog, and adds tests. Refs: hiero-ledger/hiero-consensus-specifications#38 Signed-off-by: chou-godaddy <chou@godaddy.com>
cyen-godaddy
approved these changes
Oct 5, 2026
Owner
Author
|
Approved internally. Opened upstream as hashgraph-online#184 from the same branch and commit. Closing without merging so this fork's main stays in sync with upstream. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
createAnsTrustDiscoveryAdapter(), implementing theans-trust-discoveryadapter documented in the HCS-25 specification (docs/standards/hcs-25/adapters/ans-trust-discovery.md, merged in docs(hcs-25): add ANS trust discovery adapter and signal hiero-ledger/hiero-consensus-specifications#38).certtype,dnssecurity,agentage,versionstability,dnsconsistency,httpsrecord,agentcard,certificatehygiene. The signals are read frommetadata.ansTrustDiscovery, and each score is clamped to[0,100].0is kept.scoped, weight1,includeRegistries: ['ans'], default component keyans-trust-discovery.certtype.ansTrustDiscoveryStatusofstaleapplies the configured stale multiplier.hcs25AnsTrustDiscoveryFieldsSchema,HCS25_ANS_TRUST_DISCOVERY_SIGNALSand theHCS25_SIGNAL_CATALOGentry, and registers the adapter increateHcs25AdapterCatalog().Testing
pnpm install --frozen-lockfile pnpm exec jest --config jest.config.json --testPathPattern __tests__/hcs-25 --coverage=false pnpm run lint pnpm run typecheck pnpm run buildlint,typecheckand the fullpnpm run testproduce the same results as on the base commit. The pre-existing lint warnings, type errors and environment-dependent test failures are unchanged, and none come from this change.strict.eslint.config.js) reports no findings on the new source files.createHcs25AdapterCatalog(). Per-signal components, unavailable components, adapter totals and composite totals all matched an independent computation from the provider responses. The run included a provider-reported missing signal, an extra unlisted signal key, and simulated absent-key and no-signals cases.Notes
anssubject with no ANS signals stays in the denominator at0, under the default keyans-trust-discovery.certtypewith statusmissing, as the specification defines forscopedadapters.createHcs25AdapterCatalog(), other universal and scoped adapters also participate foranssubjects. A subject that carries only ANS signals therefore has a low composite until those signals are populated. This is expected catalog behavior.stalebecomesstale, and otherwise it isok.Review checklist (team)