Repository navigation
ref(conversations): Route per-kind behavior through turnBehavior - #3059
Merged
Merged
Conversation
Add kind-behavior.ts with turnBehavior and isPersonInput. Prompt mode, tool access, delivery and the Automation result gate read it. Add a source rule to the architecture check with a baseline of the legacy branches. No behavior change; first of the child-agent series. Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
9 screenshot changes — 9 changed · 0 added · 0 removed Review screenshots in Frameshift |
… kind rule Add tools.agents to the table and bind spawnAgent and messageAgent in tool wiring from it. Replace the answer field with gated, make turnTools required, and throw when a child Run has no Conversation row. The kind rule now catches truthiness, negation, logical, switch, and reversed forms, and skips declarations, writes, and Source narrowing. Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
dcramer
approved these changes
Nov 10, 2026
23 tasks done
dcramer
added a commit
that referenced
this pull request
Nov 22, 2026
…ertions (#4025) Dashboard E2E specs get around the existing geometry and sleep bans with page script, synthetic events, raw selectors, and timeout overrides. Synthetic input also flakes, as in #3976. This adds four rules to `test-architecture:check` for `packages/junior-dashboard/e2e/**/*.spec.ts`. Shared helpers such as `harness.ts`, `screenshot.ts`, and `pick-option.ts` are not specs and stay allowed. | Rule | Matches | Baseline | | --- | --- | --- | | `dashboard-spec-page-script` | `evaluate(`, `evaluateHandle(` | 298 in 55 specs | | `dashboard-spec-synthetic-event` | `dispatchEvent(` | 57 in 20 specs | | `dashboard-spec-selector` | `locator(` with a string selector | 426 in 59 specs | | `dashboard-spec-timing` | `timeout:` overrides | 38 in 17 specs | Each error message says what to use instead: a named helper outside the spec, real input, `getByRole`/`getByLabel`/`getByText`, or `page.clock`. The counts are per file in `scripts/test-architecture-baseline.json`, under new rule keys. That uses the existing per-file shrink logic: a spec that goes above its count fails, and one that drops below it must lower the entry. `baseline-growth:check` skips a rule key that is not on the base branch, since that adopts a new check (the same way `kind-behavior` was added in #3059). After this merges, the totals are compared to main like every other rule. Matches are not filtered by comments. Glob strings such as `"**/api/conversations/*/messages"` break the shared comment stripper, and the existing dashboard rules do not filter comments either. Not covered, so open for a follow-up decision: `waitForFunction`, `$eval`/`evaluateAll`, `getByTestId`, `locator(CONSTANT)`, `test.setTimeout`, and `new Promise((r) => setTimeout(r, 250))` sleeps, which the `waitForTimeout` ban misses. This PR does not fix existing violations. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Aea4dab6709a7b92a1029c38bbe76b72e --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Aea4dab6709a7b92a1029c38bbe76b72e) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Aea4dab6709a7b92a1029c38bbe76b72e/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
This branch was successfully deployed
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 PR makes Conversation kind the one switch for per-kind Turn behavior.
chat/conversations/kind-behavior.tshasturnBehavior({ kind, personInput, automationRun }). It returns the delivery, the prompt mode, the answer gate and tool access for each kind and opener.isPersonInputmoved here fromsession-stop.ts. These read sites now use it:reportBlocked,noReply,finishAutomationRun, the review desk, subscriptions and user customizationdeliversFinalTextandpostsRunNoticesconversation-turn.tsautomationRunis a temporary bridge until kindautomationexists.The test architecture check has a new source rule. It rejects new kind, parent-edge,
declaresResultand person-Source branches outside this module. Its baseline lists the legacy sites.No behavior change; first of the child-agent series.
via @dcramer.
--
View Session [Sentry]