Repository navigation
refactor: centralize TAP helper ownership - #84
Open
ggonzalez94 wants to merge 130 commits into
Open
ggonzalez94 wants to merge 130 commits into
ggonzalez94 wants to merge 130 commits into
Conversation
…core `SigningProvider` type and removing the unsafe `any` cast without changing runtime behavior.
…ed hand-built grant-set objects with the shared core grant-set helper without changing handler behavior.
…aining hand-built grant-set object with the shared grant-set factory without changing behavior.
…nd type/payload relationship through the queue path without changing behavior.
…SDK/app tests with the shared core `createGrantSet` helper without changing behavior.
…in the targeted core, tapd, and UI test surfaces on the shared `createGrantSet` helper without behavior changes.
…sion in the CLI E2E helper on the shared core constant without changing behavior.
…core while preserving the existing ID format and app behavior.
…shared helper while preserving existing persistence behavior.
…on the shared atomic writer without changing behavior.
…routed existing atomic config writers through them without changing observable behavior.
…red atomic YAML writer without changing behavior.
… preserving existing missing-file defaults and parse-error behavior.
… atomic JSON writer without changing its two-space JSON format.
…ate, and request journal persistence without changing their existing fallback behavior.
…d conversation logger on the shared core JSON helper without changing behavior.
…d ENOENT-default helper while preserving existing behavior.
…ed atomic file utility and reused it without changing runtime behavior.
…hind a shared helper without changing command behavior.
…nd the CLI file utility without changing behavior.
… the shared CLI YAML reader without changing behavior.
… the shared CLI YAML reader without changing behavior.
…by legacy migration paths without changing behavior.
… core JSON reader without changing lock behavior.
…used by tap status without changing behavior.
…tion without changing route behavior.
…n and funds-request routes share one behavior-preserving guard.
…te expiry and meeting duration without changing route behavior.
…d a shared helper without changing route behavior.
…P validation helpers without changing behavior.
…ogic in the CLI config-set test without changing behavior.
…AML writing logic without changing behavior.
…L fixture across focused CLI tests without changing behavior.
…on without changing behavior.
… behind a shared test helper without changing behavior.
…shared helper without changing behavior.
…tion on the shared CLI `defaultConfigPath` helper without changing behavior.
…tion on the shared CLI `defaultConfigPath` helper without changing behavior.
…ig fixture paths on the shared `defaultConfigPath` helper without changing behavior.
…t suite on the shared CLI helper without changing behavior.
…sage on the production `defaultConfigPath()` helper without changing behavior.
…uction on the shared CLI helper without changing behavior.
…on shared CLI helpers without changing behavior.
… path fixtures on the shared `defaultConfigPath()` helper without changing behavior.
… core and made the CLI delegate to it without changing behavior.
…used it in app manifest persistence and CLI app-command fixtures without changing behavior.
…onstruction in core without changing behavior.
…n behind shared helpers without changing behavior.
…t changing behavior.
…y path construction on the shared core helper without changing behavior.
…reused it in focused CLI/runtime tests without changing behavior.
…behind a shared core helper without changing behavior.
…ration and warning flows without changing behavior.
…existing `getTapHermesPaths()` helper without changing behavior.
…core app path helper without changing behavior.
…ng connects and outbox directories without changing behavior.
…ng without changing token, port, or pidfile behavior.
…rivate-file helper without changing pidfile behavior.
…hared core transport path helper without changing behavior.
…sponse parsing without changing behavior.
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.
This continues the TAP simplification work by moving repeated parsing, path construction, private-file, and atomic persistence helpers into the packages that own those concerns. The branch keeps observable behavior intact while making core TAP state, tapd runtime state, CLI config IO, and host adapters use shared helper surfaces instead of local copies.\n\nI reviewed the full 130-commit diff against main for direction and consistency, then validated it with lint, typecheck, build, the full test suite, and release package verification.
Note
Medium Risk
Mostly refactors to shared helpers for payload parsing, ID generation, and filesystem IO/path resolution; risk is moderate because changes touch daemon discovery/spawn, config persistence, and app manifest handling where subtle path/parse differences could affect runtime behavior.
Overview
Centralizes repeated TAP helper logic into the owning packages and updates callers to use it, replacing scattered ad-hoc validation/parsing and path construction.
Apps (
scheduling,transfer) now rely on core parsers (parse*ActionPayload) and shared ID/grant helpers (generateActionId,createGrantSet) instead of local payload validation and manual grant-set shaping.The CLI migrates YAML/JSON reads and atomic writes to shared utilities (
readYamlFile*,write*Atomic,readJsonFileOrDefault) and adopts canonical path helpers for TAP state (e.g.,defaultConfigPath, conversations dir, app manifest paths) and tapd runtime files (socket/token/port/pid/log), including improved Hermes config/state parsing via stricter shape checks.Core app management now exposes
appManifestPathand uses shared atomic JSON helpers for manifest persistence, whileTapAppRegistry/CLI app install validation switch to a sharedhasTapAppShape/isObjectcheck. Tests were updated accordingly and a small loopback transport cloning wrapper was introduced.Reviewed by Cursor Bugbot for commit a054f5e. Bugbot is set up for automated code reviews on this repo. Configure here.