TypeScript: fix tsgo regressions, add prompt-build diagnostics, and harden workq/tool typings#178
Merged
dgarson merged 1 commit intofeat/sysprompt-contributor-patternfrom Feb 24, 2026
Conversation
016165f
into
feat/sysprompt-contributor-pattern
2 of 10 checks passed
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.
Motivation
pnpm tsgopasses and prompt-building telemetry can be safely emitted.Description
PromptContributorDecisionandPromptContributorAssemblyTrace,PromptContributorRegistry.resolveWithTraceandassembleWithTrace, and emit opt-inprompt.builddiagnostic events viaemitDiagnosticEventguarded byisDiagnosticsEnabled(cfg), and wiredcfgthrough prompt entry points (buildAgentSystemPrompt, CLI runner helpers, andcommands-system-prompt).DiagnosticEventPayloadwithDiagnosticPromptBuildEventshape to carrycontributorsandfinalstage payloads.shouldContribute/contributefailures and record selection/exclusion reasons (tag-miss, veto, errors, empty sections) and section sizes in traces.asEnumOrListfor enum-safestatus/priorityparsing in gateway handlers and added explicitunknownintermediate casts for SQLite row results to satisfy TS checks.labelfields to allworkqtool definitions so they satisfyAnyAgentTooltyping; fixed tests/mocks to useClaimResult/FilesResultand includegetByIdin DB mocks.pi-tool-definition-adaptertests to useType.Object(...)schemas (TypeBox) instead of raw JSON objects; fixed reviewer typing by addingReviewerAssignmentand aligning tests; fixed nullable access patterns in legacy config migration (dm?.policy,dm?.allowFrom).cfgintobuildAgentSystemPromptcallers (embedded/CLI path) to enable gated diagnostics.Testing
pnpm tsgoand it completed successfully (TypeScript checks pass).pnpm test extensions/issue-tracking/src/reviewers.test.ts extensions/issue-tracking/src/local-md-provider.test.ts extensions/workq/src/cli.test.ts extensions/workq/src/tools.test.ts src/agents/pi-tool-definition-adapter.test.ts src/agents/system-prompt.test.ts src/agents/prompt-contributors/registry.test.tsand all test files passed (80 tests across those suites passed).pnpm check(format + typecheck) which passes for the modified files, but lint (oxlint) still reports pre-existing repository-wide unused-import/unused-var issues in unrelatedapps/web*files; these are not introduced by this change and remain outside the scope of this PR.Codex Task