Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,24 @@ jobs:
fetch-depth: 0
fetch-tags: true
- name: Fetch documentation refs and the pinned website implementation
id: fetch-website
shell: bash
run: |
git fetch origin '+refs/heads/docs-*:refs/heads/docs-*'
git config submodule.website.url https://github.com/mycodespace-ai/devcapsule-website.git
git submodule update --init website
website_sha="$(git rev-parse --verify HEAD:website)"
rm -rf website
git -c init.defaultBranch=main init -q website
git -C website remote add origin https://github.com/mycodespace-ai/devcapsule-website.git
git -C website fetch --depth=1 origin "$website_sha"
git -C website checkout --detach FETCH_HEAD
git -c url."https://github.com/".insteadOf="git@github.com:" -C website submodule update --init --recursive
if [[ -f .gitmodules ]]; then
while IFS= read -r -d '' sub_key; do
sub_path="$(git config --file .gitmodules --get "$sub_key")"
[[ -z "$sub_path" || "$sub_path" == "website" ]] && continue
git -c url."https://github.com/".insteadOf="git@github.com:" submodule update --init --recursive -- "$sub_path"
done < <(git config --file .gitmodules --null --name-only --get-regexp '^submodule\..*\.path$' || true)
fi
- uses: actions/setup-node@v4
with:
node-version: '22'
Expand Down
39 changes: 34 additions & 5 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,26 @@ jobs:
shell: bash
run: git fetch origin '+refs/heads/docs-*:refs/heads/docs-*'
# Public checkout via HTTPS: no SSH/deployment secret needed in Actions.
- name: Fetch the exact website submodule commit
# `website` is a raw gitlink (no .gitmodules entry), so fetch its pinned
# commit directly and initialize any nested or sibling submodules recursively.
- name: Fetch the exact website gitlink commit
id: fetch-website
shell: bash
run: |
git config submodule.website.url https://github.com/mycodespace-ai/devcapsule-website.git
git submodule update --init website
website_sha="$(git rev-parse --verify HEAD:website)"
rm -rf website
git -c init.defaultBranch=main init -q website
git -C website remote add origin https://github.com/mycodespace-ai/devcapsule-website.git
git -C website fetch --depth=1 origin "$website_sha"
git -C website checkout --detach FETCH_HEAD
git -c url."https://github.com/".insteadOf="git@github.com:" -C website submodule update --init --recursive
if [[ -f .gitmodules ]]; then
while IFS= read -r -d '' sub_key; do
sub_path="$(git config --file .gitmodules --get "$sub_key")"
[[ -z "$sub_path" || "$sub_path" == "website" ]] && continue
git -c url."https://github.com/".insteadOf="git@github.com:" submodule update --init --recursive -- "$sub_path"
done < <(git config --file .gitmodules --null --name-only --get-regexp '^submodule\..*\.path$' || true)
fi
- uses: actions/setup-node@v4
with:
node-version: '22'
Expand Down Expand Up @@ -101,9 +116,23 @@ jobs:
with:
persist-credentials: false
- name: Fetch the pinned website implementation
id: fetch-website
shell: bash
run: |
git config submodule.website.url https://github.com/mycodespace-ai/devcapsule-website.git
git submodule update --init website
website_sha="$(git rev-parse --verify HEAD:website)"
rm -rf website
git -c init.defaultBranch=main init -q website
git -C website remote add origin https://github.com/mycodespace-ai/devcapsule-website.git
git -C website fetch --depth=1 origin "$website_sha"
git -C website checkout --detach FETCH_HEAD
git -c url."https://github.com/".insteadOf="git@github.com:" -C website submodule update --init --recursive
if [[ -f .gitmodules ]]; then
while IFS= read -r -d '' sub_key; do
sub_path="$(git config --file .gitmodules --get "$sub_key")"
[[ -z "$sub_path" || "$sub_path" == "website" ]] && continue
git -c url."https://github.com/".insteadOf="git@github.com:" submodule update --init --recursive -- "$sub_path"
done < <(git config --file .gitmodules --null --name-only --get-regexp '^submodule\..*\.path$' || true)
fi
- uses: actions/setup-node@v4
with:
node-version: '22'
Expand Down
98 changes: 96 additions & 2 deletions devcapsule-src/tests/integration/test_ci_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,20 @@
pytestmark = pytest.mark.integration

_WORKFLOW = REPOSITORY_ROOT / ".github" / "workflows" / "tests.yml"
_WEBSITE_WORKFLOW = REPOSITORY_ROOT / ".github" / "workflows" / "website.yml"
_DOCS_FILTER = REPOSITORY_ROOT / ".github" / "ci-paths.yml"
_ANNOTATIONS = REPOSITORY_ROOT / "devcapsule-src" / "scripts" / "diff_coverage_annotations.py"


def _job_step(workflow_path: Path, job: str, identifier: str) -> dict[str, Any]:
"""The step of ``job`` in ``workflow_path`` with the given ``id``."""
workflow = yaml.safe_load(workflow_path.read_text(encoding="utf-8"))
return next(step for step in workflow["jobs"][job]["steps"] if step.get("id") == identifier)


def _step(identifier: str) -> dict[str, Any]:
"""The step of the workflow's ``changes`` job with the given id."""
workflow = yaml.safe_load(_WORKFLOW.read_text(encoding="utf-8"))
return next(step for step in workflow["jobs"]["changes"]["steps"] if step.get("id") == identifier)
return _job_step(_WORKFLOW, "changes", identifier)


def _picomatch_like(path: str, glob: str) -> bool:
Expand Down Expand Up @@ -227,3 +233,91 @@ def run(*arguments: str, cwd: Path = root) -> subprocess.CompletedProcess[str]:
warnings, _ = bridge.build_annotations(report)
assert any("file=devcapsule-src/devcapsule/nested/sample.py,line=3,endLine=3" in warning for warning in warnings)
assert report["total_percent_covered"] < 85


@pytest.mark.parametrize(("workflow_path", "job"), [
(_WORKFLOW, "docs-build"),
(_WEBSITE_WORKFLOW, "build"),
(_WEBSITE_WORKFLOW, "candidate"),
])
def test_website_workflows_instantiate_a_raw_website_gitlink_recursively(
tmp_path: Path, workflow_path: Path, job: str,
) -> None:
"""Precondition: a parent checkout whose ``website`` entry is a raw gitlink with no
``.gitmodules`` mapping, pointing at a non-tip commit of ``devcapsule-website`` that itself
declares a nested submodule over SSH. Action: run the job's ``fetch-website`` step under
bash. Postcondition: ``website`` is checked out at the exact gitlink commit, its nested
submodule is materialized recursively, and both checkouts report clean ``git status``."""
gitconfig = tmp_path / "gitconfig"
env = {
"PATH": os.environ["PATH"],
"HOME": str(tmp_path),
"GIT_CONFIG_GLOBAL": str(gitconfig),
"GIT_CONFIG_NOSYSTEM": "1",
"GIT_TERMINAL_PROMPT": "0",
"GIT_AUTHOR_NAME": "Test",
"GIT_COMMITTER_NAME": "Test",
"GIT_AUTHOR_EMAIL": "test@example.invalid",
"GIT_COMMITTER_EMAIL": "test@example.invalid",
}

def git(*arguments: str, cwd: Path = tmp_path) -> str:
return subprocess.run(arguments, cwd=cwd, env=env, text=True, capture_output=True, check=True).stdout.strip()

nested_origin = tmp_path / "nested.git"
nested_origin.mkdir()
git("git", "init", "-q", "-b", "main", cwd=nested_origin)
(nested_origin / "nested.txt").write_text("nested\n", encoding="utf-8")
git("git", "add", "nested.txt", cwd=nested_origin)
git("git", "commit", "-q", "-m", "nested", cwd=nested_origin)
nested_sha = git("git", "rev-parse", "HEAD", cwd=nested_origin)

website_origin = tmp_path / "website.git"
website_origin.mkdir()
git("git", "init", "-q", "-b", "main", cwd=website_origin)
git("git", "config", "uploadpack.allowReachableSHA1InWant", "true", cwd=website_origin)
(website_origin / "package.json").write_text('{"name":"devcapsule-website"}\n', encoding="utf-8")
(website_origin / ".gitmodules").write_text(
'[submodule "sub"]\n\tpath = sub\n\turl = git@github.com:mycodespace-ai/nested.git\n',
encoding="utf-8",
)
git("git", "update-index", "--add", "--cacheinfo", f"160000,{nested_sha},sub", cwd=website_origin)
git("git", "add", "package.json", ".gitmodules", cwd=website_origin)
git("git", "commit", "-q", "-m", "pinned website", cwd=website_origin)
pinned_website_sha = git("git", "rev-parse", "HEAD", cwd=website_origin)
(website_origin / "package.json").write_text('{"name":"newer-unpinned"}\n', encoding="utf-8")
git("git", "add", "package.json", cwd=website_origin)
git("git", "commit", "-q", "-m", "advance main past pin", cwd=website_origin)

parent_origin = tmp_path / "parent.git"
parent_origin.mkdir()
git("git", "init", "-q", "-b", "main", cwd=parent_origin)
(parent_origin / ".gitmodules").write_text("", encoding="utf-8")
(parent_origin / "README.md").write_text("# DevCapsule\n", encoding="utf-8")
git("git", "update-index", "--add", "--cacheinfo", f"160000,{pinned_website_sha},website", cwd=parent_origin)
git("git", "add", ".gitmodules", "README.md", cwd=parent_origin)
git("git", "commit", "-q", "-m", "raw website gitlink", cwd=parent_origin)
git("git", "branch", "docs-0.3.0", cwd=parent_origin)

checkout = tmp_path / "checkout"
git("git", "clone", "-q", str(parent_origin), str(checkout))

git("git", "config", "--file", str(gitconfig), "protocol.file.allow", "always")
for prefix in ("https://github.com/mycodespace-ai/", "git@github.com:mycodespace-ai/"):
git("git", "config", "--file", str(gitconfig), "--add", f"url.{website_origin}.insteadOf", f"{prefix}devcapsule-website.git")
git("git", "config", "--file", str(gitconfig), "--add", f"url.{nested_origin}.insteadOf", f"{prefix}nested.git")

step = _job_step(workflow_path, job, "fetch-website")
subprocess.run(
["bash", "--noprofile", "--norc", "-eo", "pipefail", "-c", step["run"]],
cwd=checkout,
env=env,
text=True,
capture_output=True,
check=True,
)

assert git("git", "rev-parse", "HEAD", cwd=checkout / "website") == pinned_website_sha
assert (checkout / "website" / "sub" / "nested.txt").read_text(encoding="utf-8") == "nested\n"
assert git("git", "status", "--porcelain", "--untracked-files=normal", cwd=checkout) == ""
assert git("git", "status", "--porcelain", "--untracked-files=normal", cwd=checkout / "website") == ""
23 changes: 21 additions & 2 deletions engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Start date: 2026-09-18

State: active 2026-11-10; releasing 0.3.1 from `release-0.3.1`, cut from `main` at `31e8fec7`; candidate 2 (`v0.3.1-rc2` on `be0140ca`, merged to `main` via PR #22 `aabace3c`) published and verified; all three 0.3.1 release bugs closed (Eclipse libsoup on rc1; launcher-delivered `devcapsule_webconsole` `D-0017` and Codex npm abbreviated metadata on rc2 + `component-status` feed `0bc31c64`); Codex `0.167.0` and Claude Code `2.1.321` shipped in `embedded-33`; two rulings open (Mac/arm64 executables, compatibility feed's website path) plus end-to-end run, `notes.md`, and docs promotion before final `v0.3.1`; the blocking bug of 2026-11-10, unit tests reading the capsule's mounted launcher settings, closed 2026-11-13 on the owner's word after the merge of pull request #29 (`82b9c07e`); one blocking bug open since 2026-11-13, this repository's own project configuration predates 0.3: the refresh is checked on a copy and waits for the owner's `project init --regenerate` on the host; one major bug in fixing, the Python route and its guard, merged through #25 with the local gate's routing open; a follow-up to PR #18 on `ws-maintenance/host-inputs-at-source`, by Pair Review, for the owner's review; rewritten 2026-11-12 on the owner's direction so that host inputs are values and no touched test patches; the rule *Host Inputs* written into `WORKFLOW-LOCAL.md` on the owner's word and the rewrite reviewed by the partner through #28, merged at `83d238b8`; the owner's reading of #26 and rulings on the rule's open readings are next; *Unit Tests* rules 8 and 9 added on the owner's word and held by machine, the command line only in `test_cli.py` with eight files in a debt list, and no network in a unit test; the owner's read-then-decide direction merged through #29, on top of #26: the launch's decisions are testable from values, the holding pen is empty and three files remain in the command-line debt list

Definition read: WORKFLOW.md@e83f22a20701, WORKFLOW-LOCAL.md@e84d2678942b
Definition read: WORKFLOW.md@196d3760f99e, WORKFLOW-LOCAL.md@94a29cb6eedb

Integration target: `main`

Delivery method: ordinary maintenance PRs to `main`; owner merges. No records-only PR. The 0.3.0 release is published; website production promotion remains owner-operated.

Branch association: `release-0.3.1` from main 31e8fec7, the workstream's selection from the cut to the final tag; `ws-maintenance/0.3.1-blocking-bugs` from release-0.3.1 82b9c07e, records of the two blocking bugs, the owner merges; `ws-maintenance/launch-phases` merged through #29 and closed; `ws-maintenance/host-inputs-at-source` merged through #26 and closed; `ws-maintenance/python-route-guard` merged through #25 and closed; `ws-maintenance/pile-of-ideas` merged through #23 and closed; `ws-maintenance/0.3.1-agent-freshness` merged through #21 and closed; `ws-maintenance/codex-npm-metadata` merged through #20 and closed; `ws-maintenance/webconsole-legacy-tests` merged through #18 and closed; `ws-maintenance/webconsole-delivery` merged through #16 and closed; `ws-maintenance/move-to-organization` merged through #1 and closed; `ws-maintenance/base-consent-test` from main 445469f1; `ws-maintenance/coverage-in-pr` merged through #336 and closed; `ws-maintenance/test-conventions` merged through #335 and closed; `ws-maintenance/0.3.1-preparation` from main 31d44fa4; `release-0.3.0` closed after final publication and retained with its tags; `ws-maintenance/0.3.0-acceptance` merged through #332 and closed; earlier slice branches are historical
Branch association: `release-0.3.1` from main 31e8fec7, the workstream's selection from the cut to the final tag; `ws-maintenance/website-gitlink-actions` from release-0.3.1 2a3d6f61, recursive fetch of the `website` raw gitlink in GitHub Actions, awaiting owner pull request and merge; `ws-maintenance/0.3.1-blocking-bugs` from release-0.3.1 82b9c07e, records of the two blocking bugs, the owner merges; `ws-maintenance/launch-phases` merged through #29 and closed; `ws-maintenance/host-inputs-at-source` merged through #26 and closed; `ws-maintenance/python-route-guard` merged through #25 and closed; `ws-maintenance/pile-of-ideas` merged through #23 and closed; `ws-maintenance/0.3.1-agent-freshness` merged through #21 and closed; `ws-maintenance/codex-npm-metadata` merged through #20 and closed; `ws-maintenance/webconsole-legacy-tests` merged through #18 and closed; `ws-maintenance/webconsole-delivery` merged through #16 and closed; `ws-maintenance/move-to-organization` merged through #1 and closed; `ws-maintenance/base-consent-test` from main 445469f1; `ws-maintenance/coverage-in-pr` merged through #336 and closed; `ws-maintenance/test-conventions` merged through #335 and closed; `ws-maintenance/0.3.1-preparation` from main 31d44fa4; `release-0.3.0` closed after final publication and retained with its tags; `ws-maintenance/0.3.0-acceptance` merged through #332 and closed; earlier slice branches are historical

Requirements: `R-PRODUCT-006`, `R-COMPAT-001`, `R-PRODUCT-002`, `R-CONSOLE-001`

Expand Down Expand Up @@ -5439,6 +5439,25 @@ claimed. No final release or graphical/end-user acceptance is claimed yet.

## Open Threads

- Website raw gitlink in GitHub Actions, 2026-11-16 (`ws-maintenance/website-gitlink-actions`
-> `release-0.3.1`): `.github/workflows/tests.yml` (`docs-build`) and
`.github/workflows/website.yml` (`build` and `candidate`) now materialize
`website` at `HEAD:website` over HTTPS without requiring a `.gitmodules`
entry, initialize nested submodules inside `website` recursively, and update
any declared sibling submodules in `.gitmodules`. Verified by
`tests/integration/test_ci_workflow.py` (`70 passed`), `mypy` (`344` files),
`validate_unittests_follow_conventions.py` (`0` breaches), `nox -s smoke pex
docs-contract webconsole`, `npm --prefix website test` (`23 passed`), and
`3,264` passing unit tests (`2` pre-existing `gid=0` legacy failures in
`test_recursive_orchestrator.py` inside this rootless-Docker `0:0` capsule).
The local `website` checkout at `c57a50c9` stays untouched in the working
tree. Awaiting the human: open and merge the pull request into
`release-0.3.1` (`gh` CLI is absent in this capsule), then re-run or merge
PR #40 (`release-0.3.1-tmp4gitlink`).
- Intake item `2026-11-10-project-management-console-video-does-not-play-from-files.md`
is acknowledged on 2026-11-16. Pull request #35 (`6ff6bf18`) committed
[the bug record](../../bugs/devcapsule/2026-11-10-console-video-opened-from-files-does-not-play.md)
with `status: fixed` and `target: 0.3.1`. Browser verification closes it.
- Blocking for 0.3.1, fixed on `ws-maintenance/0.3.1-rootless-docker` 2026-11-15
(host rootless validation pending): when `docker info` reports
`Security Options: rootless`, entry layers pass `uid=0, gid=0, user="root"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ undispositioned, or listed below, meaning resolved. Never both, never neither.
| `2026-10-30-workflow-improvements-pair-review-loop-030.md` | 2026-10-30 | acknowledged | Accepted for 0.3.0; apply supplied release patch in a separate slice after CI review settles; PR #309 verified on main. |

| `2026-10-30-project-management-user-docs-0-3-0-cli-alignment.md` | 2026-10-30 | acknowledged | Accepted for immediate 0.3.0 execution across five `<= 10`-file Pair Review batches (`Antigravity` + `Codex / gpt-6-astra`) on `release-0.3.0`: file-by-file 0.3.0 CLI alignment, full 0.3.0 authoring of all 12 `status: planned` stubs, and human-English prose cleanup; PR #316 verified on `main` at `ebab228a`. |
| `2026-11-10-project-management-console-video-does-not-play-from-files.md` | 2026-11-16 | acknowledged | Acknowledged; the bug record is on `release-0.3.1` with `status: fixed` and `target: 0.3.1` after PR #35 (`6ff6bf18`), awaiting browser verification before closure. |
Loading