sase-github 0.2.1__tar.gz → 0.2.3__tar.gz

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.
Files changed (40) hide show
  1. sase_github-0.2.3/.release-please-manifest.json +3 -0
  2. {sase_github-0.2.1 → sase_github-0.2.3}/CHANGELOG.md +14 -0
  3. {sase_github-0.2.1 → sase_github-0.2.3}/PKG-INFO +1 -1
  4. {sase_github-0.2.1 → sase_github-0.2.3}/README.md +1 -1
  5. {sase_github-0.2.1 → sase_github-0.2.3}/docs/architecture.md +11 -11
  6. {sase_github-0.2.1 → sase_github-0.2.3}/docs/xprompts.md +4 -4
  7. {sase_github-0.2.1 → sase_github-0.2.3}/pyproject.toml +1 -1
  8. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/scripts/new_pr_desc_get_context.py +14 -11
  9. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/workspace_plugin.py +57 -45
  10. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/xprompts/gh.yml +6 -6
  11. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/xprompts/new_pr_desc.yml +3 -3
  12. {sase_github-0.2.1 → sase_github-0.2.3}/tests/test_submit_with_recorded_pr.py +1 -1
  13. {sase_github-0.2.1 → sase_github-0.2.3}/tests/test_workspace_plugin.py +5 -5
  14. sase_github-0.2.1/.release-please-manifest.json +0 -3
  15. {sase_github-0.2.1 → sase_github-0.2.3}/.github/workflows/ci.yml +0 -0
  16. {sase_github-0.2.1 → sase_github-0.2.3}/.github/workflows/pr-title.yml +0 -0
  17. {sase_github-0.2.1 → sase_github-0.2.3}/.github/workflows/publish.yml +0 -0
  18. {sase_github-0.2.1 → sase_github-0.2.3}/.sase_beads/beads.db +0 -0
  19. {sase_github-0.2.1 → sase_github-0.2.3}/.sase_beads/config.json +0 -0
  20. {sase_github-0.2.1 → sase_github-0.2.3}/.sase_beads/issues.jsonl +0 -0
  21. {sase_github-0.2.1 → sase_github-0.2.3}/CLAUDE.md +0 -0
  22. {sase_github-0.2.1 → sase_github-0.2.3}/Justfile +0 -0
  23. {sase_github-0.2.1 → sase_github-0.2.3}/LICENSE +0 -0
  24. {sase_github-0.2.1 → sase_github-0.2.3}/docs/configuration.md +0 -0
  25. {sase_github-0.2.1 → sase_github-0.2.3}/release-please-config.json +0 -0
  26. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/__init__.py +0 -0
  27. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/config.py +0 -0
  28. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/default_config.yml +0 -0
  29. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/errors.py +0 -0
  30. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/plugin.py +0 -0
  31. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/scripts/__init__.py +0 -0
  32. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/scripts/gh_setup.py +0 -0
  33. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/xprompts/pr_diff.yml +0 -0
  34. {sase_github-0.2.1 → sase_github-0.2.3}/src/sase_github/xprompts/prdd.yml +0 -0
  35. {sase_github-0.2.1 → sase_github-0.2.3}/tests/__init__.py +0 -0
  36. {sase_github-0.2.1 → sase_github-0.2.3}/tests/test_ci_install_contract.py +0 -0
  37. {sase_github-0.2.1 → sase_github-0.2.3}/tests/test_config.py +0 -0
  38. {sase_github-0.2.1 → sase_github-0.2.3}/tests/test_github_issues.py +0 -0
  39. {sase_github-0.2.1 → sase_github-0.2.3}/tests/test_github_plugin.py +0 -0
  40. {sase_github-0.2.1 → sase_github-0.2.3}/uv.lock +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.2.3"
3
+ }
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.3](https://github.com/sase-org/sase-github/compare/v0.2.2...v0.2.3) (2026-08-09)
4
+
5
+
6
+ ### Documentation
7
+
8
+ * mark github plugin patch compatibility boundaries ([e79c33b](https://github.com/sase-org/sase-github/commit/e79c33b231d72605957f793fb6a338c910913af0))
9
+
10
+ ## [0.2.2](https://github.com/sase-org/sase-github/compare/v0.2.1...v0.2.2) (2026-08-08)
11
+
12
+
13
+ ### Features
14
+
15
+ * adopt Patch terminology in GitHub integration ([bc4fec5](https://github.com/sase-org/sase-github/commit/bc4fec5d436853eb9b839339d855093d13ce83aa))
16
+
3
17
  ## [0.2.1](https://github.com/sase-org/sase-github/compare/v0.2.0...v0.2.1) (2026-07-25)
4
18
 
5
19
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sase-github
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: GitHub VCS plugin for sase
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -59,7 +59,7 @@ Requires `sase>=0.11.0` as a dependency. For GitHub Enterprise Server or self-ho
59
59
  ### Workspace Provider
60
60
 
61
61
  - **GitHubWorkspacePlugin** — Workspace provider that handles GitHub-specific workflow orchestration: reference
62
- resolution (repo paths, project names, changespec names), PR submission via `gh pr merge`, branch management, and
62
+ resolution (repo paths, project names, Patch names), PR submission via `gh pr merge`, branch management, and
63
63
  commit description formatting. It also owns GitHub SDD policy: every GitHub project requires a labeled sidecar
64
64
  repository, materialized before `#gh` work starts.
65
65
  - **Repo completion for `#gh:<owner>/` refs** — Supplies repository candidates to SASE prompt completion by calling
@@ -51,7 +51,7 @@ Handles higher-level workflow orchestration. Implements workspace hooks for GitH
51
51
  | `ws_create_sdd_remote()` | Verifies or creates `--sdd`, `--plans`, or `--research` and returns its metadata |
52
52
  | `ws_prepare_mail()` | Displays branch/description and prompts user before pushing |
53
53
  | `ws_format_commit_description()` | Prepends `[project]` prefix to commit messages |
54
- | `ws_submit()` | Submits a ChangeSpec by merging its PR via `gh pr merge --merge --delete-branch` |
54
+ | `ws_submit()` | Submits a Patch by merging its PR via `gh pr merge --merge --delete-branch` |
55
55
 
56
56
  The provider declares `separate_repo` SDD policy. Core supplies a unique staging path; the plugin finds or creates the
57
57
  selected sidecar, ensures its `sase--sdd` label, and clones with the normal SSH/HTTPS fallback. It returns only a
@@ -98,13 +98,13 @@ When the ref matches an existing project directory, `PROJECT_NAME`, or project a
98
98
  - Reads `WORKSPACE_DIR` from the project file
99
99
  - Checks out the default branch
100
100
 
101
- ### Mode 3: ChangeSpec Name
101
+ ### Mode 3: Patch Name
102
102
 
103
- When the ref matches an existing ChangeSpec:
103
+ When the ref matches an existing Patch:
104
104
 
105
- - Searches all changespecs for a matching name
106
- - Reads `WORKSPACE_DIR` from the changespec's project file
107
- - Checks out `origin/<name>` (the ChangeSpec's branch)
105
+ - Searches all Patches for a matching name
106
+ - Reads `WORKSPACE_DIR` from the Patch's project file
107
+ - Checks out `origin/<name>` (the Patch's branch)
108
108
 
109
109
  ## Ref Namespace Completion
110
110
 
@@ -119,14 +119,14 @@ deduplicated case-insensitively, with record-derived spellings preferred when bo
119
119
 
120
120
  ## Submission Flow
121
121
 
122
- When submitting a GitHub ChangeSpec (`ws_submit`):
122
+ When submitting a GitHub Patch (`ws_submit`):
123
123
 
124
- 1. Kill and persist all running processes on the ChangeSpec
125
- 2. Verify no active child ChangeSpecs exist
126
- 3. Claim a workspace and checkout the ChangeSpec branch
124
+ 1. Kill and persist all running processes on the Patch
125
+ 2. Verify no active child Patches exist
126
+ 3. Claim a workspace and checkout the Patch branch
127
127
  4. Check for an existing PR on the branch
128
128
  5. Merge via `gh pr merge --merge --delete-branch`
129
- 6. Finalize submission (update ChangeSpec status)
129
+ 6. Finalize submission (update Patch status)
130
130
  7. Release the workspace
131
131
 
132
132
  ## Config Helper
@@ -14,7 +14,7 @@ the target branch, and captures diffs.
14
14
 
15
15
  | Parameter | Type | Default | Description |
16
16
  |---|---|---|---|
17
- | `gh_ref` | word | (required) | Repo path (`user/project`), project name, or ChangeSpec name |
17
+ | `gh_ref` | word | (required) | Repo path (`user/project`), project name, or Patch name |
18
18
  | `n` | int | `null` | Workspace number override (auto-assigned if null) |
19
19
  | `release` | bool | `true` | Whether to release the workspace when done |
20
20
  | `workflow_label` | word | `null` | Optional label for the workflow |
@@ -41,7 +41,7 @@ the target branch, and captures diffs.
41
41
  # Work on a project by shorthand name
42
42
  #gh(sase) Add a new CLI command for status checking
43
43
 
44
- # Resume work on an existing ChangeSpec
44
+ # Resume work on an existing Patch
45
45
  #gh(fix-auth-bug) Continue implementing the OAuth flow
46
46
 
47
47
  # Work without releasing the workspace
@@ -58,12 +58,12 @@ Generates an AI-written PR title and body from the diff and commits on a branch,
58
58
 
59
59
  | Parameter | Type | Description |
60
60
  |---|---|---|
61
- | `name` | word | ChangeSpec name to generate the description for |
61
+ | `name` | word | Patch name to generate the description for |
62
62
 
63
63
  ### Steps
64
64
 
65
65
  1. **get_context** — Runs a Python script that retrieves the diff, commit history, workspace directory, default branch,
66
- and current branch name for the ChangeSpec.
66
+ and current branch name for the Patch.
67
67
  2. **generate** — Launches a sub-agent with the diff and commits, instructing it to produce a title (conventional
68
68
  commits format, under 72 chars) and a body (markdown with `## Summary` and bullet points).
69
69
  3. **apply** — Looks up the PR for the branch via `gh pr view` and updates it with `gh pr edit` using the generated
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sase-github"
7
- version = "0.2.1"
7
+ version = "0.2.3"
8
8
  description = "GitHub VCS plugin for sase"
9
9
  requires-python = ">=3.12"
10
10
  license = "MIT"
@@ -5,9 +5,13 @@ import subprocess
5
5
  import tempfile
6
6
  from pathlib import Path
7
7
 
8
- from sase.ace.changespec import find_all_changespecs
9
8
  from sase.workspace_provider.utils import get_default_branch, parse_workspace_dir
10
9
 
10
+ try:
11
+ from sase.ace.patch import find_all_patches
12
+ except ImportError: # Older supported SASE releases expose only ChangeSpec names.
13
+ from sase.ace.changespec import find_all_changespecs as find_all_patches
14
+
11
15
  try:
12
16
  from sase.core.paths import ( # type: ignore[attr-defined]
13
17
  get_sase_managed_tmpdir,
@@ -30,19 +34,18 @@ except ImportError: # sase < 0.11.2 does not ship the helper yet
30
34
 
31
35
 
32
36
  def main(*, name: str) -> None:
33
- """Find changespec, get diff and commit info for PR description generation.
37
+ """Find a Patch, then get diff and commit subjects for PR description generation.
34
38
 
35
39
  Prints key=value output for the workflow executor.
36
40
  """
37
- # Find the ChangeSpec
38
- changespec = None
39
- for cs in find_all_changespecs():
40
- if cs.name == name:
41
- changespec = cs
41
+ patch = None
42
+ for candidate in find_all_patches():
43
+ if candidate.name == name:
44
+ patch = candidate
42
45
  break
43
46
 
44
- if changespec is None:
45
- print(f"error=ChangeSpec '{name}' not found")
47
+ if patch is None:
48
+ print(f"error=Patch '{name}' not found")
46
49
  print("description=")
47
50
  print("diff=")
48
51
  print("workspace_dir=")
@@ -50,7 +53,7 @@ def main(*, name: str) -> None:
50
53
  print("branch_name=")
51
54
  return
52
55
 
53
- project_file = changespec.file_path
56
+ project_file = patch.file_path
54
57
  workspace_dir = parse_workspace_dir(project_file)
55
58
  if not workspace_dir:
56
59
  print("error=WORKSPACE_DIR is not set for this project")
@@ -65,7 +68,7 @@ def main(*, name: str) -> None:
65
68
  default_branch = default_branch_ref.rsplit("/", 1)[-1]
66
69
 
67
70
  # Get description
68
- desc = changespec.description or "No description"
71
+ desc = patch.description or "No description"
69
72
 
70
73
  # Get diff against default branch
71
74
  try:
@@ -17,7 +17,19 @@ from collections.abc import Mapping, Sequence
17
17
  from pathlib import Path
18
18
  from typing import TYPE_CHECKING, Any, Literal
19
19
 
20
- from sase.ace.changespec.project_spec_path import preferred_project_spec_path
20
+ try:
21
+ from sase.ace.patch import Patch, find_all_patches
22
+ from sase.ace.patch.project_spec_path import preferred_project_spec_path
23
+ except ImportError: # Older supported SASE releases expose only ChangeSpec names.
24
+ from sase.ace.changespec import ( # type: ignore[no-redef]
25
+ # Legacy import names are adapted to canonical Patch locals.
26
+ ChangeSpec as Patch,
27
+ # Legacy import names are adapted to canonical Patch locals.
28
+ find_all_changespecs as find_all_patches,
29
+ )
30
+ from sase.ace.changespec.project_spec_path import ( # type: ignore[no-redef]
31
+ preferred_project_spec_path,
32
+ )
21
33
  from sase.workspace_provider import (
22
34
  ExternalRepoCloneResult,
23
35
  ResolvedRef,
@@ -420,7 +432,9 @@ class GitHubWorkspacePlugin:
420
432
  @hookimpl
421
433
  def ws_prepare_mail(
422
434
  self,
435
+ # Legacy hook argument name retained for compatibility.
423
436
  changespec_name: str,
437
+ # Legacy hook argument name retained for compatibility.
424
438
  changespec_parent: str | None,
425
439
  project_basename: str,
426
440
  project_file: str,
@@ -451,22 +465,24 @@ class GitHubWorkspacePlugin:
451
465
  @hookimpl
452
466
  def ws_submit(
453
467
  self,
468
+ # Legacy hook argument name retained for compatibility.
454
469
  changespec_file: str,
455
470
  changespec_name: str,
456
471
  project_basename: str,
457
472
  console: object | None = None,
458
473
  ) -> tuple[bool, str | None] | None:
459
- """Submit a GitHub ChangeSpec by merging its PR."""
474
+ """Submit a GitHub Patch by merging its PR."""
460
475
  from sase.workspace_provider import detect_workflow_type
461
476
 
462
- vcs_type = detect_workflow_type(changespec_file)
477
+ patch_file = changespec_file # legacy hook argument name
478
+ patch_name = changespec_name
479
+ vcs_type = detect_workflow_type(patch_file)
463
480
  if vcs_type != "gh":
464
481
  return None
465
482
 
466
483
  from rich.console import Console as RichConsole
467
484
  from rich.markup import escape as escape_markup
468
485
 
469
- from sase.ace.changespec import ChangeSpec, find_all_changespecs
470
486
  from sase.ace.hooks.processes import (
471
487
  kill_and_persist_all_running_processes,
472
488
  )
@@ -483,14 +499,13 @@ class GitHubWorkspacePlugin:
483
499
  console if isinstance(console, RichConsole) else None
484
500
  )
485
501
 
486
- # Find the ChangeSpec object
487
- changespec: ChangeSpec | None = None
488
- for cs in find_all_changespecs():
489
- if cs.name == changespec_name:
490
- changespec = cs
502
+ patch: Patch | None = None
503
+ for candidate in find_all_patches():
504
+ if candidate.name == patch_name:
505
+ patch = candidate
491
506
  break
492
- if changespec is None:
493
- return (False, f"ChangeSpec '{changespec_name}' not found")
507
+ if patch is None:
508
+ return (False, f"Patch '{patch_name}' not found")
494
509
 
495
510
  log_fn = (
496
511
  (lambda msg: rich_console.print(f"[cyan]{escape_markup(msg)}[/cyan]"))
@@ -498,31 +513,31 @@ class GitHubWorkspacePlugin:
498
513
  else None
499
514
  )
500
515
  kill_and_persist_all_running_processes(
501
- changespec,
502
- changespec_file,
503
- changespec_name,
516
+ patch,
517
+ patch_file,
518
+ patch_name,
504
519
  "Killed hook running on submitted PR.",
505
520
  log_fn=log_fn,
506
521
  )
507
522
 
508
- all_changespecs = find_all_changespecs()
523
+ all_patches = find_all_patches()
509
524
  if has_active_children(
510
- changespec,
511
- all_changespecs,
525
+ patch,
526
+ all_patches,
512
527
  terminal_statuses=("Submitted", "Reverted", "Archived"),
513
528
  ):
514
529
  return (
515
530
  False,
516
- "Cannot submit: other ChangeSpecs have this one as their "
531
+ "Cannot submit: other Patches have this one as their "
517
532
  "parent and are not Submitted, Reverted, or Archived",
518
533
  )
519
534
 
520
- workspace_dir = parse_workspace_dir(changespec_file)
535
+ workspace_dir = parse_workspace_dir(patch_file)
521
536
  if not workspace_dir:
522
537
  return (False, "WORKSPACE_DIR is not set for this project")
523
538
 
524
- workspace_num = get_first_available_axe_workspace(changespec_file)
525
- workflow_name = f"submit-{changespec_name}"
539
+ workspace_num = get_first_available_axe_workspace(patch_file)
540
+ workflow_name = f"submit-{patch_name}"
526
541
  pid = os.getpid()
527
542
 
528
543
  try:
@@ -534,11 +549,11 @@ class GitHubWorkspacePlugin:
534
549
  rich_console.print(f"[cyan]Claiming workspace #{workspace_num}[/cyan]")
535
550
 
536
551
  if not claim_workspace(
537
- changespec_file,
552
+ patch_file,
538
553
  workspace_num,
539
554
  workflow_name,
540
555
  pid,
541
- changespec_name,
556
+ patch_name,
542
557
  ):
543
558
  return (
544
559
  False,
@@ -548,12 +563,12 @@ class GitHubWorkspacePlugin:
548
563
  try:
549
564
  if rich_console:
550
565
  rich_console.print(
551
- f"[cyan]Checking out {escape_markup(changespec_name)}...[/cyan]"
566
+ f"[cyan]Checking out {escape_markup(patch_name)}...[/cyan]"
552
567
  )
553
568
 
554
569
  provider = get_vcs_provider(ws_dir)
555
570
  branch_name = provider.resolve_revision(
556
- changespec_name, project_basename, ws_dir
571
+ patch_name, project_basename, ws_dir
557
572
  )
558
573
  success, error = provider.checkout(branch_name, ws_dir)
559
574
  if not success:
@@ -564,47 +579,46 @@ class GitHubWorkspacePlugin:
564
579
 
565
580
  if rich_console:
566
581
  rich_console.print(
567
- f"[cyan]Merging {escape_markup(changespec_name)} into "
582
+ f"[cyan]Merging {escape_markup(patch_name)} into "
568
583
  f"{escape_markup(default_branch)}...[/cyan]"
569
584
  )
570
585
 
571
586
  # Prefer the recorded PR URL/number when available — this is
572
587
  # resilient to branch renames (e.g. suffix strip/append).
573
- pr_number = _extract_pr_number(changespec.pr_url)
588
+ pr_number = _extract_pr_number(patch.pr_url)
574
589
  if pr_number:
575
590
  pr_state = _check_pr_state(pr_number, ws_dir)
576
591
  if pr_state == "OPEN":
577
592
  return _submit_via_pr_merge(
578
- changespec, ws_dir, rich_console, pr_number=pr_number
593
+ patch, ws_dir, rich_console, pr_number=pr_number
579
594
  )
580
595
  elif pr_state == "CLOSED":
581
596
  return (
582
597
  False,
583
- f"PR #{pr_number} (from ChangeSpec PR field) is closed "
598
+ f"PR #{pr_number} (from Patch PR field) is closed "
584
599
  "and unmerged. Reopen it or create a new PR with #pr.",
585
600
  )
586
601
  elif pr_state == "MERGED":
587
602
  return (
588
603
  False,
589
- f"PR #{pr_number} (from ChangeSpec PR field) is already "
590
- "merged.",
604
+ f"PR #{pr_number} (from Patch PR field) is already merged.",
591
605
  )
592
606
  # pr_state is None — fall through to branch-based check
593
607
 
594
608
  # Fallback: check for a PR on the current branch
595
609
  has_pr = _check_existing_pr(ws_dir)
596
610
  if has_pr:
597
- return _submit_via_pr_merge(changespec, ws_dir, rich_console)
611
+ return _submit_via_pr_merge(patch, ws_dir, rich_console)
598
612
  return (
599
613
  False,
600
614
  "GitHub project has no PR for this branch. Create a PR first with #pr.",
601
615
  )
602
616
  finally:
603
617
  release_workspace(
604
- changespec_file,
618
+ patch_file,
605
619
  workspace_num,
606
620
  workflow_name,
607
- changespec_name,
621
+ patch_name,
608
622
  )
609
623
  if rich_console:
610
624
  rich_console.print(f"[cyan]Released workspace #{workspace_num}[/cyan]")
@@ -1650,8 +1664,6 @@ def _resolve_existing_named_ref(
1650
1664
  read_only: bool,
1651
1665
  strict: bool,
1652
1666
  ) -> ResolvedRef | None:
1653
- from sase.ace.changespec import find_all_changespecs
1654
-
1655
1667
  projects_base = _projects_base()
1656
1668
  alias_record = _find_project_record_for_alias(
1657
1669
  _list_project_records(projects_base),
@@ -1675,20 +1687,20 @@ def _resolve_existing_named_ref(
1675
1687
  checkout_target=checkout_target,
1676
1688
  )
1677
1689
 
1678
- for cs in find_all_changespecs():
1679
- if cs.name != gh_ref:
1690
+ for patch in find_all_patches():
1691
+ if patch.name != gh_ref:
1680
1692
  continue
1681
- workspace_dir = parse_workspace_dir(cs.file_path)
1693
+ workspace_dir = parse_workspace_dir(patch.file_path)
1682
1694
  if not workspace_dir:
1683
1695
  if strict:
1684
1696
  raise ValueError(
1685
- f"ChangeSpec '{gh_ref}' found in {cs.file_path} "
1697
+ f"Patch '{gh_ref}' found in {patch.file_path} "
1686
1698
  "but WORKSPACE_DIR is not set"
1687
1699
  )
1688
1700
  return None
1689
1701
  return ResolvedRef(
1690
- project_file=cs.file_path,
1691
- project_name=cs.project_basename,
1702
+ project_file=patch.file_path,
1703
+ project_name=patch.project_basename,
1692
1704
  primary_workspace_dir=workspace_dir,
1693
1705
  checkout_target=f"origin/{gh_ref}",
1694
1706
  )
@@ -1717,7 +1729,7 @@ def resolve_gh_ref(gh_ref: str) -> ResolvedRef:
1717
1729
  2. **Project shorthand** (no ``/``, matching project dir): look up
1718
1730
  WORKSPACE_DIR from ``~/.sase/projects/<name>/<name>.sase``
1719
1731
  (with legacy ``.gp`` fallback).
1720
- 3. **ChangeSpec name**: search all changespecs for a matching name,
1732
+ 3. **Patch name**: search all Patches for a matching name,
1721
1733
  read WORKSPACE_DIR from its project file.
1722
1734
 
1723
1735
  Raises:
@@ -1782,7 +1794,7 @@ def _check_existing_pr(cwd: str) -> bool:
1782
1794
 
1783
1795
 
1784
1796
  def _submit_via_pr_merge(
1785
- changespec: object,
1797
+ patch: object,
1786
1798
  ws_dir: str,
1787
1799
  console: object | None,
1788
1800
  *,
@@ -1838,7 +1850,7 @@ def _submit_via_pr_merge(
1838
1850
 
1839
1851
  from sase.workspace_provider.submission_utils import finalize_submission
1840
1852
 
1841
- return finalize_submission(changespec.file_path, changespec.name, console) # type: ignore[attr-defined, arg-type]
1853
+ return finalize_submission(patch.file_path, patch.name, console) # type: ignore[attr-defined, arg-type]
1842
1854
 
1843
1855
 
1844
1856
  def _non_interactive_gh_env(base: Mapping[str, str] | None = None) -> dict[str, str]:
@@ -5,7 +5,7 @@ tags: vcs, rollover
5
5
  input:
6
6
  - name: gh_ref
7
7
  type: word
8
- description: GitHub repo, PR, branch, or ChangeSpec reference to check out.
8
+ description: GitHub repo, PR, branch, or Patch reference to check out.
9
9
  - name: n
10
10
  type: int
11
11
  default: null
@@ -68,14 +68,14 @@ steps:
68
68
  provider = get_vcs_provider(os.getcwd())
69
69
 
70
70
  # Checkout the PR branch so that subsequent diffs are relative to the
71
- # PR tip rather than the default branch. Try checkout_target first
71
+ # PR tip rather than the default branch. Try checkout_target first
72
72
  # (works for default-branch refs like origin/main), then fall back to
73
- # ChangeSpec name -> branch name conversion.
74
- is_changespec = checkout_target == f"origin/{gh_ref}"
73
+ # Patch name -> branch name conversion.
74
+ is_patch = checkout_target == f"origin/{gh_ref}"
75
75
  ok, err = provider.checkout(checkout_target, os.getcwd())
76
76
  if not ok:
77
- if is_changespec:
78
- # ChangeSpec ref — resolve name to branch name
77
+ if is_patch:
78
+ # Patch ref — resolve name to branch name
79
79
  resolved = provider.resolve_revision(
80
80
  gh_ref, project_name, os.getcwd()
81
81
  )
@@ -1,9 +1,9 @@
1
- description: Generate and apply a GitHub pull request title and body from a ChangeSpec.
1
+ description: Generate and apply a GitHub pull request title and body from a Patch.
2
2
 
3
3
  input:
4
4
  - name: name
5
5
  type: word
6
- description: ChangeSpec name whose branch and diff should drive the PR description.
6
+ description: Patch name whose branch and diff should drive the PR description.
7
7
 
8
8
  steps:
9
9
  - name: get_context
@@ -24,7 +24,7 @@ steps:
24
24
  agent: |
25
25
  Generate a PR title and body for the following changes.
26
26
 
27
- ## ChangeSpec Description
27
+ ## Patch Description
28
28
  {{ get_context.description }}
29
29
 
30
30
  ## Commits
@@ -1,4 +1,4 @@
1
- """Tests for ws_submit using the recorded PR URL from ChangeSpec.pr_url.
1
+ """Tests for ws_submit using the recorded PR URL from Patch.pr_url.
2
2
 
3
3
  Covers:
4
4
  - _extract_pr_number extracts from GitHub PR URLs
@@ -1914,8 +1914,8 @@ class TestResolveGhRef:
1914
1914
  @patch(
1915
1915
  "sase_github.workspace_plugin.get_default_branch", return_value="origin/main"
1916
1916
  )
1917
- @patch("sase.ace.changespec.find_all_changespecs")
1918
- def test_changespec_name(
1917
+ @patch("sase_github.workspace_plugin.find_all_patches")
1918
+ def test_patch_name(
1919
1919
  self,
1920
1920
  mock_find: MagicMock,
1921
1921
  mock_branch: MagicMock,
@@ -1941,8 +1941,8 @@ class TestResolveGhRef:
1941
1941
  assert result.project_name == "proj"
1942
1942
  assert result.canonical_ref is None
1943
1943
 
1944
- @patch("sase.ace.changespec.find_all_changespecs")
1945
- def test_changespec_no_workspace_dir(self, mock_find: MagicMock) -> None:
1944
+ @patch("sase_github.workspace_plugin.find_all_patches")
1945
+ def test_patch_no_workspace_dir(self, mock_find: MagicMock) -> None:
1946
1946
  with tempfile.NamedTemporaryFile(mode="w", suffix=".sase", delete=False) as f:
1947
1947
  f.write("NAME: my-feature\n")
1948
1948
  f.flush()
@@ -1961,7 +1961,7 @@ class TestResolveGhRef:
1961
1961
  resolve_gh_ref("my-feature")
1962
1962
  os.unlink(f.name)
1963
1963
 
1964
- @patch("sase.ace.changespec.find_all_changespecs", return_value=[])
1964
+ @patch("sase_github.workspace_plugin.find_all_patches", return_value=[])
1965
1965
  def test_not_found(self, mock_find: MagicMock) -> None:
1966
1966
  with patch(
1967
1967
  "sase_github.workspace_plugin.Path.home",
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.2.1"
3
- }
File without changes
File without changes
File without changes
File without changes