feat(process): the assistant runs a process the signed-in person may run, confirmed on a card; four review findings closed #110
Open
james.maes
wants to merge 2 commits from
feat/process-tools into develop
pull from: feat/process-tools
merge into: QRun-IO:develop
QRun-IO:develop
QRun-IO:feat/writes-follow-the-person
QRun-IO:fix/atomic-confirm-and-closed-surface
QRun-IO:fix/tool-service-owns-policy-and-identity
QRun-IO:fix/tool-call-service-enforces-its-checks
QRun-IO:feat/tool-registry
QRun-IO:docs/actions-and-mcp-design
QRun-IO:release/0.1
QRun-IO:rc/develop-into-release-0.1-everyone
QRun-IO:feat/store-reads-as-trusted-code
QRun-IO:rc/develop-into-release-0.1-weekly
QRun-IO:feat/weekly-budget
QRun-IO:rc/develop-into-release-0.1-save
QRun-IO:feat/save-and-schedule-analysis
QRun-IO:rc/develop-into-release-0.1-analyze
QRun-IO:feat/analyze-records
QRun-IO:fix/turn-watchdog-never-hangs-develop
QRun-IO:fix/turn-watchdog-never-hangs
QRun-IO:fix/live-thread-placeholders
QRun-IO:merge/develop-into-release-0.1
QRun-IO:automation/qbit-rc-pending
QRun-IO:fix/transcript-stored-before-message-end-develop
QRun-IO:fix/transcript-stored-before-message-end
QRun-IO:main
QRun-IO:archive/qrun-github-cutover-20261101/ca9212731dc2/develop
QRun-IO:feat/openai-compatible-provider
QRun-IO:dependabot/maven/develop/maven-minor-and-patch-634f43d868
QRun-IO:dependabot/github_actions/develop/github-actions-0fdda1077f
QRun-IO:feature/orb-0.8-track
QRun-IO:feature/orb-0.7.18
QRun-IO:feature/orb-0.7.17
QRun-IO:feature/orb-standardize-release-0.1
QRun-IO:feature/orb-main-standardization
QRun-IO:feature/shared-codeql
QRun-IO:feature/orb-0712-stable-gate
QRun-IO:feature/orb-rc-worker
QRun-IO:feature/orb-0.7.11
QRun-IO:feature/central-ci
QRun-IO:feature/conversation-management
QRun-IO:feature/starter-prompts-from-access
QRun-IO:feature/turns-not-jobs
QRun-IO:feature/assistant-attachments
QRun-IO:feature/assistant-optional-provider-health
QRun-IO:fix/assistant-health-tile-wording
QRun-IO:feature/fail-soft-renders
QRun-IO:fix/records-render-and-stream-context
QRun-IO:ci/release-rc-secrets-inherit
QRun-IO:feature/ui-api-1.6
QRun-IO:fix/shutdown-hook-weak-runtime
QRun-IO:fix/help-bundle-version
QRun-IO:feature/health-checks
QRun-IO:feature/jobs-tray
QRun-IO:feature/help-bundle
QRun-IO:feature/transcript-redaction
QRun-IO:feature/foreign-keys
QRun-IO:feature/schema-indexes
QRun-IO:fix/assistant-defaults-rollback
QRun-IO:feature/durable-turns
QRun-IO:fix/assistant-defaults-guards
QRun-IO:feature/tables-populated-defaults
QRun-IO:feature/provider-spi-package
QRun-IO:feature/email-api
QRun-IO:feature/orb-0.6.9
QRun-IO:feature/write-mode
QRun-IO:feature/x1-y1-channel-wall
QRun-IO:feature/email-qbit
QRun-IO:feature/spec-endpoints-core-invoker
QRun-IO:feature/provider-api-module
QRun-IO:feature/p7-scheduled-tasks
QRun-IO:feature/bulk-load-tools
QRun-IO:feature/p6-rag
QRun-IO:feature/presentation-demo-shots
QRun-IO:feature/answer-presentation
QRun-IO:fix/core-alerts-rc5
QRun-IO:feature/p5-routing-fallback
QRun-IO:feature/p4-budgets
QRun-IO:feature/p3-hipaa-routing
QRun-IO:feature/p2-bedrock-vertex
QRun-IO:feature/p1-provider-registry
QRun-IO:feature/spec-providers-write-mode-wall
QRun-IO:feature/demo-pending-card
QRun-IO:feature/release-rc-automation
QRun-IO:feature/demo-screens
QRun-IO:feature/profiles-skills-access
QRun-IO:feature/ui-api-tools
QRun-IO:feature/strict-tools-grammar-fix
QRun-IO:feature/app-home-settings
QRun-IO:feature/fix-rename-version-labels
QRun-IO:feature/note-burned-rc
QRun-IO:feature/assistant-record-screens
QRun-IO:feature/robustness-test-flake
QRun-IO:feature/ga-only-release-tags
QRun-IO:feature/snake-case-table-names
QRun-IO:chore/qrun-repo-standard
QRun-IO:feature/pom-revision-comment
QRun-IO:feature/phase-0-1-assistant
No Reviewers
Labels
Clear labels
architecture
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
release:rc
secuurity
ux
wontfix
Architecture review: coupling, cohesion, UI API
Something isn't working
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Pull requests that update GitHub Actions code
Good for newcomers
Extra attention is needed
This doesn't seem right
Pull requests that update java code
Further information is requested
Merging this develop PR cuts the next release candidate
Admin UX / information architecture
This will not be worked on
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: QRun-IO/qbit-assistant#110
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Builds package A4 of the actions design (
docs/actions-and-mcp.md, section 4 and 12.2): the assistant can run a process the signed-in person may run themselves, after that person confirmed the run on a card. With it, four findings of the last independent review, each described by the guarantee it gives, and the one test that review asked for.One behaviour change needs a host's attention before deploying: a table's own bulk edit and bulk delete become runnable through the assistant, and any other process once the application names it on its reviewed list.
UPGRADE.mdsays what to do.An independent review of this pull request followed; what changed after it is in "Changes after the independent review" below, and the rest of this description is brought up to date with it.
The rules this package keeps
What a person can now ask for, and what they see
list_processesanddescribe_process: the processes this person may run and their inputs, from the person's own metadata (asked as them through the UI API). A process they may not run is never listed or described, and by name it is refused in the words used for a process that does not exist.run_processproposes the run. Before a card exists the inputs are checked against the fields the process's screens declare: an unknown input, a value of the wrong type and a missing required input are refused. The records are found as the person and fixed then, by primary key (a filter that finds more than 500 is refused, for the person to narrow).What is never runnable through the assistant
Decided in one place,
ProcessRunnability, shared by the tools and the host's reviewed list:assistantclient channel: by its author (QPermissionRules.withDeniedClients(Set.of("assistant"))), by the application (ClientChannelsMetaData) or by core's default patterns;READ_WRITE(a pin or default in code, or an administrator's row);The default in code is unchanged (
defaultProcessAccessisREAD_WRITE); it is a ceiling. Which processes run under it is said by the application's registered reviewed list. An application that registered none has two kinds of runnable process: a table's own bulk edit and bulk delete.A long-running process
assistantchannel waiting for the person and refuses to start it from that channel (DurableJobs.launchandcontrol, read at the QQQ version this repository builds against). The assistant calls only the launch, and sends no expected row count, so core's "small assistant jobs start by themselves" setting never applies either. The person starts the job on its job record, from their own session.initandstepoperations. A step that goes to the background is waited for briefly (15 seconds); after that the run is reported as still running.RUNNINGfor a job's duration (retention fails an action leftRUNNINGfor over an hour).get_run_statusreports where a run or a job stands, and never moves one on.The reviewed list (finding 1)
What runs is decided when the application runs. The application registers the processes it reviewed for the assistant in its code:
The list names; it grants nothing: rules 1 to 6, an administrator's narrowing row and the person's own permission hold for a listed process as for any other, and nothing in the database adds a process.
The build-time helper stays, as the way an application notices drift:
personis a session with the permissions of the roles to review, or null for a person who holds every permission. The test fails, naming each process, when a process could be listed and is not, when a listed process is gone, and when the file is not the list the application registered. It needs the instance with the QBit produced, and no server or database.The review findings
ProcessToolsTest.theProcessToolsAreOfferedOnlyToAPersonWhoMayRunAProcess,onlyAReviewedProcessOrATablesOwnBulkActionRuns,theReviewHelperFailsWhenTheListAndTheApplicationDriftDataAccessFollowUserChangelogTest.theQueryInTheUpgradeNotesFindsExactlyTheRowsTheChangesetRemoves(runs the query fromUPGRADE.mdand the changeset on the same rows)ChatToolSetTestRoutingFallbackTest.classifierIsNotAskedWithNoSpendingLimitInForce(seen failing with the check taken out),AssistantSettingsTest.theConnectionTestNeedsNoSpendingLimitAndIsBoundedWritesFollowThePersonTest.anUpdateIntoARecordSecurityKeyThePersonLacksIsRefusedAtConfirmAndNothingChangesThe cached request prefix changes once
The tool list is part of the cached prefix. The stored file the chat tool-set test compares against was compared with the new one line by line; it differs in exactly two ways.
Before, for a person who may change a table (24 tools):
After (28): the same, plus
describe_process,get_run_status,list_processes,run_process, each in its sorted place. Every line that was there is byte for byte what it was, except that the descriptions ofcreate_record,update_recordanddelete_recordno longer end "unless the administrator turned confirmation off".For a person who may run no process (10 tools, before and after, byte for byte):
The process tools appear only for a person who may run at least one process through the assistant, and not when the policy leaves them out. The host of that test registered no reviewed list, so the person who may change tables is offered the four (the tables' bulk actions), and the person of the scenario
everythingAsAnotherPerson, who may run processes of another QBit and change no table, is not: that scenario's lines in the stored file are without the four process tools (the one expectation ofChatToolSetTestthat changed after the review).Where the code differs from the design
Recorded in
docs/actions-and-mcp.md, section 4.5. In short: a process the person may not run is refused as if it did not exist (not with the operation's "permission denied"); two more kinds of process are never runnable (no screen offers it; its table is read-only for the assistant); a download is not drivable (only links into the application are emitted); the second card at a review is proposed with the run's reference instead of being created by the confirmation; a run over records is refused at confirmation when one of its records is gone; possible values of an input are not listed. After the review: the reviewed list is enforced when the application runs, not only in its build; a field whose name a process keeps for itself is not an input; a run stops at every later screen that has something to show; the records of a run are fixed at the proposal; a card to go on carries the run's version; a process that may run as a job is never run another way; text of the application reaches a model only inside the data envelope.Also
run_processonly with its write approval.assistant1.10.0, additive:AssistantActionV1.processName,processLabel;changescarries the card's lines for aprocess_run. A released panel draws the card as a record change (it knows only the three record tools); the run works.AssistantStoreis still the only code that calls data actions. No schedule or report tool (that is A5).Not closed
Changes after the independent review
The review's verdict was "fix first". Each change is described by the guarantee it gives, with the test that shows it.
ProcessControlNames.RESERVED).describe_processlists such a field undercannotBeSetThroughTheAssistant, a value for it is refused before a card exists and again at confirmation, and the process stays runnable for its other fields.ProcessRequestsTest.aFieldWhoseNameTheProcessKeepsForItselfIsNeverSent(a fixture table with an editable field namedsourceTable: every request of the run is read, and none carries a value under that name),ProcessControlNamesTestProcessToolsTest.aRunStopsAtALaterScreenWithATextUntilACardShowedIt,aRunStopsAtALaterFormWhoseValuesAStepComputed,aRunStopsAtALaterScreenWithValuesToRead,aRunStopsAtALaterScreenThatListsRecords,aScreenWithNothingToShowIsPassedAndTheFirstScreenIsOnTheFirstCardProcessToolsTest.onlyAReviewedProcessOrATablesOwnBulkActionRuns(no list, an empty list, a list that also names processes a rule keeps away, an administrator's row that adds nothing, a card made before the list was taken away),theReviewHelperFailsWhenTheListAndTheApplicationDriftProcessToolsTest.aRunIsOverExactlyTheRecordsItsCardCounted,aFilterThatFindsMoreThanTheCapIsRefused,ProcessRequestsTest.aRunProposedWithAFilterIsSentWithTheRecordsOfItsCardProcessRequestsTest.aProcessThatMayRunAsAJobIsNeverRunOnConfirmationInsteadProcessToolsTest.whatTheApplicationSaidReachesAModelOnlyAsData(a conversation: propose, confirm, ask again; the next request is read whole)ProcessToolsTest.aCardGoesOnOnlyWithTheRunAsItStoodWhenTheCardWasMadeThe reserved names, and where they come from.
ProcessControlNames.RESERVEDwas read from the QQQ version this repository builds against (4.1.0-RC.32): every nameStreamedETLWithFrontendProcess,StreamedETLProcess, the streamed preview, validate and execute steps,ExtractViaQueryStep, theLoadVia...steps and the bulk edit and bulk delete steps read from or write to a run's values; every nameRunProcessActionandRunBackendStepActionread from them; and the names the process operations carry a run's records, identity and timing in.ProcessControlNamesTestreflects over the constants those classes declare and over the inputs a streamed process's backend steps declare, and fails when the set lacks one, so a later QQQ that adds a name is noticed. The inputs of a process's own backend steps are added per process, from its metadata.What changes for a person or a host, beyond the above.
source(the tool whose outcome it repeats). A panel shows it as any text.Kept true:
ChatToolSetTestpasses with one changed expectation (named above);ToolCallChecksTestpasses unchanged;AssistantStoreis still the only code that calls data actions; no new tool.Verification
./mvnw --batch-mode --no-transfer-progress -s <settings> -T1C clean verifyata9ebe64: BUILD SUCCESS: the enforcer rules, the tests of all seven modules (600 inqbit-assistant, none failed or skipped) and the JaCoCo gate of each. That command runs no Checkstyle, SpotBugs or PMD in this repository.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.