Repository navigation
fix: Keep tasks in their project and run Postgres and UI tests in CI - #182
Merged
Merged
Conversation
CI ran go test with no database, so every Postgres store and migration test skipped, including the history compaction path, and the consumer UI plugin image published without its tests running. The runner pod has no Docker, so a checksum-pinned embedded Postgres 17 now starts as a step, and in that job a Postgres test with no database fails instead of skipping. A new UI job installs, tests and builds the plugin before its image publishes, and typecheck passes only on the six known errors from the unpublished assistant-chat-kit 0.2.1.
A2A SendMessage with a task id continued a stored task without checking its project, and GetTask and CancelTask allowed tasks with no owner, so a caller could read or extend another project's task. The project API client built paths from unvalidated group, version, name and namespace. The server now refuses any task whose stored owner is missing or not the caller's project, and the client validates and escapes every path segment and never follows a redirect on a write.
ecv
previously approved these changes
Nov 17, 2026
ecv
left a comment
Contributor
There was a problem hiding this comment.
Approve.
Cross-project task access is closed at the server and again in the executor. The Postgres tests now run in CI, and the typecheck allowlist fails when it goes stale.
- Tenant isolation holds.
authorize()routes SendMessage and SendStreamingMessage throughcheckContinuationand GetTask and CancelTask throughcheckTaskAccess. Every other method, ListTasks, subscribe and push config included, getsMethod not permitted. Both a store error (503) and an ownerless task fail closed, and the 403 does not name the owner. The four HTTP routes all check project access, and history is keyed on project plus context. I removed each guard in turn, andTestSendMessage_RefusesAnotherProjectsTask,TestTaskReads_RefuseTaskWithNoOwnerandTestExecute_RefusesStoredTaskOfAnotherProjecteach failed. - The Postgres tests run in CI. In run 44003116422 the
testjob setsTEST_DATABASE_URLandTEST_DATABASE_REQUIRED: true, andtestdb.URLturns a missing URL intoFatalf, so theoklines are real runs. The job runs without-v, so no log line names an individual Postgres test. typecheck-known-errors.shmatches only TS2339 on three props inchat-dock.tsx, fails on any other error, and fails when the count is not exactly 6.
Follow-ups:
- When the typecheck comes back clean, the script exits 0 and only tells you to delete it. Make that case fail so the allowlist cannot outlive the fix.
- The count is per pattern, not per line. Fixing one of the 6 while adding a new
onChooseerror elsewhere inchat-dock.tsxwould still pass. Pin the exact list.
The typecheck allowlist counted matches per pattern, so fixing one known error while adding another of the same kind still passed, and a clean typecheck exited 0, so the allowlist could outlive the fix. It now compares the exact six positions and fails on any difference, and fails when the typecheck comes back clean so the script gets deleted.
ecv
approved these changes
Nov 17, 2026
ecv
left a comment
Contributor
There was a problem hiding this comment.
Approve.
Both earlier follow-ups are fixed. A clean typecheck now fails the job, and the allowlist pins each of the 6 errors by file, line, column and prop, so fixing one while adding another fails.
- Any non-TS2339 error stays whole in the comparison and fails it, and the job passed at this head.
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.
Problem
CI ran every Postgres store and migration test as a skip, including the history compaction path, and published the consumer UI plugin image without testing it. A2A
SendMessagewith a task id continued another project's task,GetTaskandCancelTaskallowed tasks with no owner, and the project API client built paths from unvalidated model input.Solution
CI starts a checksum-pinned Postgres 17, since the runner has no Docker, and in that job a Postgres test with no database fails instead of skipping, while the shared ci-basic workflow still skips. A new UI job tests and builds the plugin before its image publishes. The server refuses any task whose owner is missing or another project, and the project API client validates and escapes every path segment and never follows a redirect on a write.
The UI typecheck passes only on six known errors: the plugin calls assistant-chat-kit 0.2.1 APIs (
onApprovePlan,onChoose,onChangePlan), but npm only has 0.2.0, so those plan card handlers are likely missing in the deployed dock until chat-kit publishes. A foreign task id gets a 403 rather than not found.Closes #179