Barrel seams + fetch fixes for embarc-data features (accredited-portal → VC-firm → startup/rounds → round-participation → ADV)#207
Merged
Conversation
…egistry Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SN7APmki7GFHYYyhBd8ZFM
Replace the static RESOLVER_IDS array and hardcoded per-kind switches with the runtime ResolverExtensionRegistry everywhere. ResolverId becomes a runtime-validated string; coverage and drop-previous dispatch through the registered kind's closures. Wire registerSecResolvers() into the CLI bootstrap and into the tests that enumerate resolver kinds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SN7APmki7GFHYYyhBd8ZFM
…on bootstrap setupAllDatabases() -> bootstrapComponentVersions() now enumerates the ResolverExtensionRegistry, and this path also runs from `init` (which skips the preAction hook that calls registerSecResolvers). Register idempotently here so resolver component-version rows are seeded on every setup path.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SN7APmki7GFHYYyhBd8ZFM
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SN7APmki7GFHYYyhBd8ZFM
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SN7APmki7GFHYYyhBd8ZFM
…le-instance DI/schemas
…data) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SN7APmki7GFHYYyhBd8ZFM
- databaseExtensions: add registerDatabaseSetupHook/runDatabaseSetupHooks; setupAllDatabases runs them after EnvToDI/Sqlite.init so a downstream package's tables + resolver kinds materialize on the `init` path too (which bypasses the CLI preAction hook), not only `db setup`. - ResolverCoverage: split the coverage guard so a non-family resolver kind without a coverage closure is no longer mislabeled "family-tier"; wrap the over-length import. - barrel: export registerDatabaseSetupHook, setupAllDatabases, Sqlite, computeResolverCoverage (needed by the downstream init-path + dispatch tests). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SN7APmki7GFHYYyhBd8ZFM
…downstream ingestion
…ests Lets a downstream feature package validate TypeBox schemas in tests without taking a direct typebox dependency. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011br6tfY3N2Ce5WhgbEs2wK
Downstream task subclasses with interface-typed I/O hit the same DataPorts constraint sec's own tasks bridge with TaskPorts<T>; export it so they reuse it instead of duplicating the type. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011br6tfY3N2Ce5WhgbEs2wK
…lyAliasRepo for downstream family tiers
SecFetchTask always forced SecUserAgent last in the header merge, so a caller-supplied User-Agent (e.g. a browser UA needed for a Cloudflare-fronted host) was silently overwritten. Flip the merge order so caller headers win, matching SecFetchJob's existing precedence.
SecCachedFetchTask.execute() rebuilt its outgoing fetch input from scratch (url/method/response_type only), silently dropping any headers merged onto defaults by SecFetchTask's constructor. That made the just-fixed caller-UA override a no-op for every cached-fetch subclass (FetchQuarterlyIndexTask, FetchCompanyFactsTask, etc.) since none of them route headers to the wire. Preserve input.headers when present.
… formatting for clarity
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.
Supersedes #205. This is the
sec-side surface the stackedembarc-datafeature work builds on, all on one branch (based onaccredited-portal, now merged up tomain).What's here (sec only — no domain data lives in sec)
registerResolverExtension,registerDatabaseExtension,registerDatabaseSetupHook, and the expanded package barrel (src/index.ts) — everything the extracted accredited-portal feature and later features import.Task/Workflow/IExecuteContext/isStaleByAsOf/TaskPorts/Value, and family-tierFamilyResolver/normalizeFamilyName/CanonicalFamilyAliasRepo.SecFetchTask— a caller-suppliedUser-Agentnow overrides the default instead of being forced.SecCachedFetchTask.execute— was rebuilding the fetch input and silently dropping caller headers; now threads them through.main(packaging fix(package): stop shipping src/ tree in published tarball #204, CIK arg-parser fix(sec): tighten parseIntOption + fix bundled import.meta.dir asset paths #206, asset-path fixes).Testing
bun test→ 1910 pass / 0 fail;bun run buildclean.Companion
Pairs with the
embarc-dataPR (sroussey/embarc-data) that consumes this surface.🤖 Generated with Claude Code
https://claude.ai/code/session_01SN7APmki7GFHYYyhBd8ZFM