Repository navigation
Implement accepted Issue #75 - #513
Merged
robgruen merged 4 commits intoNov 3, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The default TypeScript test command omits the new metadata suite, so normal CI compiles but does not execute its metadata, repair-total, or failure-retention regression assertions.
1 open issue
What changed in this PR
Implements Issue #75’s accepted TypeScript scope by exposing optional provider-neutral usage and filtering metadata without changing validated application data.
Changes:
- Extracts reported token counts and filtering details from existing OpenAI and Azure client paths.
- Preserves response records and reported-only totals across repairs and failures.
- Adds offline regression tests and documentation crediting intuity-hans and unmerged PR #80.
| File | Description |
|---|---|
typescript/test/metadata.test.ts |
Adds mocked coverage for extraction, aggregation, failures, and compatibility. |
typescript/src/typechat.ts |
Retains metadata across translation and repair attempts. |
typescript/src/result.ts |
Adds optional metadata types and reported-usage aggregation. |
typescript/src/model.ts |
Extracts provider metadata and retains it through retries and failures. |
typescript/metadata.md |
Documents mappings, reporting limits, usage, and contributor credit. |
Review effort: Balanced
Include the metadata suite in ordinary npm test and CI instead of only compiling it. Update the documented command. This owner-approved follow-up leaves the original automated publication evidence unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Separate filtered and refused replies from response-format errors without dumping provider bodies into messages. Preserve response records and application results while explicitly marking unrepresentable token totals as overflow. Add boundary, retry, repair, and error-message regressions and document the owner-approved behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Include the guide in npm packages, link it from the published README, and verify the exact packaged guide and link target in the existing clean-consumer regression test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
robgruen
approved these changes
Nov 3, 2026
This was referenced Nov 3, 2026
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.

Implements the exact accepted scope for Issue #75.
Owner build authorization: #75 (comment)
Summary
Expose optional provider-neutral TypeScript response metadata with reported token totals across repair and retained filtering details on success and failure; add offline regression coverage and documentation crediting intuity-hans and unmerged PR 80.
Agreed work
Accepted work
Approved by the project owner, robgruen, for issue #75.
Goal
Let TypeScript applications inspect service-reported token usage and available content-filtering information alongside TypeChat responses, including reported totals across repair and retained information on failure, without changing validated application data or requiring a particular provider.
Scope
Non-goals
Acceptance criteria
Existing contributions
Proposal run | Approved scope policy
This accepts the scope above. It does not start or authorize an automated implementation run, increase any budget, or approve merging. Material scope changes require a new proposal and owner decision.
Verified execution
fd25d4412ac6232b183e17a97433ca7f7221b8064253443df11e4d70a5f5ab1592259934e9579d559a25d49c3f608ba9329b3728931d0c7d8a82aa677597a020537160c284b2c66ac4da08a3bd6aaa833bd0786ae9c53b6e63dac9bbc334696b0879168fbcb427f21363f16d678803d45452dd97git diff --checktypescript: npm run buildtypescript: npm run build-alltypescript: npm testOwner-authorized follow-up
The workflow published original commit
adcfc9323fc2b5afa1130ed6a121c78a5d02a0a8. The owner separately approved:58ee0f8c285227e4096194a95f25e9f9d38f24a2: run the metadata suite in ordinarynpm testand update its documented command.fa9d14c7f6786b9ad22de42f4effc67339ae94bb: report filtered/refused replies with a concise error instead of dumping the provider body into the message; preserve original records and application results while explicitly marking omitted, unrepresentable token totals asoverflow.1c1abe6f9566ecd7d691596344911ce1f30f83bd: include the metadata guide in npm packaging and link it from the published README; extend the existing package-consumer test to verify the exact packed guide and complete guide URL. The README uses an absolute GitHub link so npm rendering does not depend on repository-subdirectory rebasing.The original context/candidate/patch hashes and isolated-check/scan evidence above remain tied to the original automated commit. They have not been rewritten to claim coverage of these owner-approved follow-ups. The documentation-packaging/discovery finding was initially deferred and is now addressed by the documentation-only follow-up.
Verification before the documentation-only follow-up
npm testpasses all 241 tests with no failures or skips. The 21 metadata tests cover filtered error privacy, exact safe-integer boundaries, unaffected counts, overflow during HTTP retries, and repair success/failure retention.Limitations
Documentation-only follow-up verification
1c1abe6f9566ecd7d691596344911ce1f30f83bd. It builds the root and workspaces, creates and extracts the real npm tarball, verifies the guide matches the source and the packaged README links to its exact GitHub URL, and validates the package in a clean TypeScript 7 consumer. No live provider calls were made.1c1abe6f9566ecd7d691596344911ce1f30f83bd, including the Node 22.23.4 / 24.22.1 / 26.12.1 builds, Python Pyright matrix, CodeQL, and CLA check. Human review and merge remain separate decisions.