@orion-agents/orion-code 0.3.17 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -22,6 +22,41 @@ which is **not** a pass.
|
|
|
22
22
|
|
|
23
23
|
## [Unreleased]
|
|
24
24
|
|
|
25
|
+
## [0.3.18]
|
|
26
|
+
|
|
27
|
+
> **Status: released.** Closes the assertion and evidence backlog of the Git
|
|
28
|
+
> right-hand work panel shipped in 0.3.17, and fixes the CRLF part-staging
|
|
29
|
+
> defect found right after that release.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **CRLF part-staging was impossible:** the rebuilt context reused the
|
|
34
|
+
normalised display text, dropping the carriage return, so the patch never
|
|
35
|
+
matched the stored bytes. The raw line is reused so the context keeps its
|
|
36
|
+
line endings, and a selection that still cannot apply is refused explicitly
|
|
37
|
+
with `git_patch_not_applicable` instead of surfacing as a Git failure.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- **Assertion coverage for the G317 backlog:** deleting and renaming through
|
|
42
|
+
the panel (git records R with the content preserved), line-level staging on a
|
|
43
|
+
CRLF file, a signing failure (HEAD and the staged work untouched), bare and
|
|
44
|
+
non-repository workspaces, and a clean repository with readable history.
|
|
45
|
+
- **Conflict-assertion split:** the plan requirement (a conflict is never shown
|
|
46
|
+
as an ordinary stageable diff) is asserted separately from whether the ideal
|
|
47
|
+
three-way view rendered — the earlier single assertion was flaky because the
|
|
48
|
+
three-way view loads asynchronously.
|
|
49
|
+
- **Browser evidence:** conflict, comparison, blame, narrow-viewport and
|
|
50
|
+
open-in-Files screenshots under docs/plan/evidence/v0.3.17-git/screenshots/.
|
|
51
|
+
|
|
52
|
+
### Known gaps
|
|
53
|
+
|
|
54
|
+
- The bare-repository `status()` contract is measured but not yet pinned (its
|
|
55
|
+
current behaviour is neither a refusal nor an empty status).
|
|
56
|
+
- Performance samples for the S5/S6 reads, dark-theme screenshot assertions,
|
|
57
|
+
and the agent-led file-change scenario are still open.
|
|
58
|
+
|
|
59
|
+
---
|
|
25
60
|
## [0.3.17]
|
|
26
61
|
|
|
27
62
|
> **Status: candidate.** Opening a local project is made fast and honest
|
|
@@ -63,7 +63,11 @@ function buildHunkBody(hunk, selection) {
|
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
65
|
// Kept in the index: becomes context.
|
|
66
|
-
|
|
66
|
+
//
|
|
67
|
+
// The original raw line is reused with its prefix swapped for a space, NOT
|
|
68
|
+
// `line.text`. `text` is the normalised display form, so rebuilding from it dropped
|
|
69
|
+
// the `\r` of a CRLF file and the patch then failed to apply against the real index.
|
|
70
|
+
body.push(` ${line.raw.slice(1)}`);
|
|
67
71
|
oldCount += 1;
|
|
68
72
|
newCount += 1;
|
|
69
73
|
}
|
|
@@ -718,7 +718,17 @@ class GitReadModelServiceV1 {
|
|
|
718
718
|
await (0, git_index_transaction_1.withIndexTransaction)(pathsInfo, context => this.readTreeEmpty(context), async (context) => {
|
|
719
719
|
// `--recount` derives line counts from the body, so a partially rebuilt hunk still
|
|
720
720
|
// applies exactly as written. `--check` first: nothing is written on a failed check.
|
|
721
|
-
await this.runGit(['apply', '--cached', '--check', '--recount', ...direction, '-'], pathsInfo.root, 'index', context.env, patch)
|
|
721
|
+
await this.runGit(['apply', '--cached', '--check', '--recount', ...direction, '-'], pathsInfo.root, 'index', context.env, patch).catch(error => {
|
|
722
|
+
const message = error instanceof Error ? error.message : '';
|
|
723
|
+
// A patch rebuilt from the reviewed document can still be inapplicable to the real
|
|
724
|
+
// index. CRLF line endings are the common cause: the diff text cannot represent them
|
|
725
|
+
// unambiguously, so the rebuilt context does not match the stored bytes. The plan
|
|
726
|
+
// requires such a selection to be refused explicitly rather than to fail as a Git
|
|
727
|
+
// error — nothing has been written at this point.
|
|
728
|
+
throw new errors_1.WebWorkbenchError(409, /patch failed|patch does not apply/iu.test(message)
|
|
729
|
+
? 'This selection cannot be applied to the index (CRLF line endings are a common cause).'
|
|
730
|
+
: message, 'git_patch_not_applicable');
|
|
731
|
+
});
|
|
722
732
|
await this.runGit(['apply', '--cached', '--recount', ...direction, '-'], pathsInfo.root, 'index', context.env, patch);
|
|
723
733
|
});
|
|
724
734
|
return this.mutationResult();
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-agents/orion-code",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@orion-agents/orion-code",
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.18",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@clack/prompts": "^0.7.0",
|