Repository navigation
Conversation
A create spec can never touch an existing object, by design. An edit spec
is the counterpart: each item names its task with `task: T123` and states
what it should be, and `phabfive apply -f` sends only the difference
through the engine `phabfive edit` uses.
- A key that is absent is left alone, so `{task: T123, status: resolved}`
is a whole edit
- A list is the full set, or a delta of `+name` and `-name` entries; a mix
is refused. Nothing is ever sent as a set
- Relative values (`priority: raise`, `column: forward`) are refused: a
file applied twice has to name where the task ends up
- A task that already matches is left alone, so applying a file twice
changes nothing the second time
- An item carrying `modified:` is refused as `stale` when the task was
modified after it and the item would change it; `apply --force`
overrides. The stamp is consulted only when there is something to send,
so a rerun is not refused for the change the first run made
- Every item is planned before any is applied, and each problem is
reported under its own key
- `kind: edit` is never inferred, and a create item carrying `task:` or
`modified:` is refused by name, so an edit that lost its kind cannot
create a duplicate
`phabfive apply -f -` and `phabfive spec validate -` read the spec from
standard input.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
5 tasks done
This branch has not been 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.
Summary
Second of three stacked pull requests. Based on #623; review only the last commit, and retarget to
mainonce that one is merged.A create spec can never touch an existing object, by design. This adds the counterpart,
kind: edit, for tasks:phabfive apply -fcompares each item with the task as the server has it and sends only the difference, through the enginephabfive editalready uses. No new transaction-building code and no new Conduit method.+nameand-nameentries. A mix is refused (mixed-list). Nothing is sent as a set.priority: raiseandcolumn: forwardare refused (relative-value).unchanged, exit 0.modified:is an optional ISO 8601 stamp. An item that would change a task modified after its stamp is refused asstale, exit 2;apply --forceoverrides.phabfive spec validateruns the same plan as its online layer.kind: editis never inferred. A create item carryingtask:ormodified:is refused by name, so an edit spec that lost its kind cannot create a duplicate.phabfive apply -f -andphabfive spec validate -read the spec from standard input.docs/edit-specs.mdis the guide,docs/phorge-spec.mdgains "Edit documents", andspecs/edit/close-out.yamlis a runnable example.Behaviour worth a look in review
column:names no board, so it means the one workboard the task is on once the item is applied. An item that says bothcolumn:and a differentprojects:moves the card on the new board, or is refused asunknown-columnwhen that board has no such column.phabfive editconfirms title, description and policy changes.--dry-runis the preview.assignment, as in a create spec, so the two write kinds share their keys.Test plan
tests/test_spec_edit_offline.py), the planner against a fake engine (tests/test_edit_spec.py), and the command (tests/test_cli_apply_edit.py), including the deprecatedmaniphest create --withrefusing an edit spec.tests/e2e/test_edit_spec.pyagainst a local Phorgestable: the difference is sent once, a rerun is a no-op, a stale item is refused and--forceapplies it, every problem is reported and nothing is written, and stdin.make test-e2eonstable: 160 passed, 2 skipped.scripts/gen_spec_docs.py --checkandmkdocs build --strict.phabricator-stablewas not run locally; theci:phabricator-stablelabel ran it here, and it passes. The support matrix is unchanged, since no new Conduit method, constraint or field is used.🤖 Generated with Claude Code