Repository navigation
feat(compat): work item change and history: X03, X02, sub work items and relations - #97
Merged
Merged
Conversation
…k items and relations the page asks for Stage 6b of #44, after 6a (#85). PATCH on a work item (X03) and its history (X02) against the pin, plus the two reads the work item page makes next, answered empty as D-021 does (sub-issues, issue-relation). - migration 0014: work_item_activities, one row per change an event names, keyed by (event_id, ordinal) so a redelivered event writes nothing - ports: Tx::update_work_item, work_item_history and the activity writers, in the memory and Postgres adapters - core: Permission::UpdateWorkItem and update_issue; the activity consumer (process_event) now also projects history - compat: the PATCH route, history/, sub-issues/ and issue-relation/; fixtures X02 and X03 recorded from the pin - D-029 (six differences from the pin) and G-22 (what is recorded and what is read from source only); contract.sh EXPECT_MAIN 54 to 55 Refs: #44 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
5 tasks
This was referenced Nov 15, 2026
Closed
Merged
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.
What
Stage 6b of #44, after 6a (#85): changing a work item and reading its history, against the pin.
PATCH /api/workspaces/{slug}/projects/{project}/issues/{issue}/GET .../issues/{issue}/history/GET .../issues/{issue}/sub-issues/,.../issue-relation/How it works
work_item_activities: one row per change an event names, keyed by(event_id, ordinal)so an event the queue delivers twice writes nothing the second time. The row names the work item's own workspace and project, so a read needs no join.Tx::update_work_item,work_item_historyand the activity writers, in the memory and Postgres adapters.Permission::UpdateWorkItemandupdate_issue; the activity consumer (process_event) now also projects the history.history/,sub-issues/andissue-relation/; fixtures X02 and X03;contract.shEXPECT_MAIN54 to 55.For your decision
sort_orderis refused with 400 because nothing here moves a work item; fields the pin accepts but no app sends are ignored; a description's history value is stored cleaned and capped at 16 KiB; a maker who is no longer in the project gets 403 where the pin lets them through;is_subscribedis false for everyone.Rebase notes
The work was written before #86 (rustfmt) and #87 (the clippy deny list) landed, so it was rebased onto
41e87b1and three things changed to fitmain, with the work itself untouched:self.state.lock().unwrap()in the memory adapter now use the existinglock_unpoisoned();PgTx::client()returns aResultonmain, so the five calls inupdate_work_itemtake a?;thrust-core/tests/issue_updates.rs,thrust-adapters-memory/tests/history.rs) carry the#![allow(..., reason = ...)]header thatclippy.tomlasks for.Verified
On the rebased commit, locally:
cargo fmt --all --checkandscripts/check-deps.sh: clean.cargo clippy --workspace --all-targets --locked -- -D warnings, and the wasm32 Worker run: clean.cargo nextest run --profile ci --workspace: 2576 passed, 4 skipped (the new suites ran). Doctests pass.cargo test -p thrust-adapters-selfhosted --test pg_adapteragainst Docker: 38 passed.Not run by me: the contract cells (CI runs them),
scripts/mutants.sh,cargo mutants, and the recorder against the pin. Fixtures X02 and X03 are as the authoring session recorded them. No dependency changed, socargo denywas not re-run.Refs: #44
🤖 Generated with Claude Code