Skip to content

Commit 7fb4e0f

Browse files
authored
Merge pull request #242 from LeXwDeX/dev
release: promote workflow, memory, goal, and DAG fixes
2 parents 4b4d6dc + 5ee9eb3 commit 7fb4e0f

125 files changed

Lines changed: 16558 additions & 1793 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-bun/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ runs:
5656
# e.g. ./patches/ for standard-openapi
5757
# https://github.com/oven-sh/bun/issues/28147
5858
if [ "$RUNNER_OS" = "Windows" ]; then
59-
bun install --linker hoisted ${{ inputs.install-flags }}
59+
bun install --frozen-lockfile --linker hoisted ${{ inputs.install-flags }}
6060
else
61-
bun install ${{ inputs.install-flags }}
61+
bun install --frozen-lockfile ${{ inputs.install-flags }}
6262
fi
6363
shell: bash
6464

.github/workflows/release-fork.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,31 +89,40 @@ jobs:
8989
# (LeXwDeX/opencode-dag-config) into a release asset. dev/main do not manage
9090
# these templates anymore — the config repo is the single source of truth.
9191
# Read-only: no commits, no pushes, so branch protection never blocks it.
92+
#
93+
# Validate-before-package: the releasing runtime commit runs its directory
94+
# validator against the config repo HEAD BEFORE any copy/package step. Any
95+
# invalid template — or an unavailable validator — fails the job (fail
96+
# closed), so an unchecked archive can never be uploaded or embedded.
9297
package-templates:
9398
name: Package Reference Templates
9499
if: github.event_name == 'workflow_dispatch'
95100
runs-on: ubuntu-latest
96101
permissions:
97102
contents: read
98103
steps:
104+
- name: Checkout Runtime (releasing commit)
105+
uses: actions/checkout@v4
106+
99107
- name: Clone Config Repo
100108
uses: actions/checkout@v4
101109
with:
102110
repository: LeXwDeX/opencode-dag-config
103111
path: dag-config
104112

105-
- name: Package Templates
113+
- name: Setup Bun
114+
uses: ./.github/actions/setup-bun
115+
with:
116+
save-cache: false
117+
118+
- name: Install Runtime Dependencies
119+
run: bun install --frozen-lockfile
120+
121+
- name: Validate and Package Templates (fail closed)
122+
working-directory: packages/opencode
106123
run: |
107-
mkdir -p dist
108-
shopt -s nullglob
109-
files=(dag-config/*.yaml)
110-
if [ ${#files[@]} -gt 0 ]; then
111-
cp "${files[@]}" dist/
112-
else
113-
echo "::warning::No templates found in opencode-dag-config root; packaging empty archive"
114-
fi
115-
tar -czf dag-templates.tar.gz -C dist .
116-
echo "Templates packaged: $(ls dist | wc -l) files"
124+
echo "Packaging config commit $(git -C "$GITHUB_WORKSPACE/dag-config" rev-parse HEAD) with runtime commit $(git rev-parse HEAD)"
125+
bun run script/package-dag-templates.ts "$GITHUB_WORKSPACE/dag-config" "$GITHUB_WORKSPACE/dag-templates.tar.gz"
117126
118127
- name: Upload Templates Artifact
119128
uses: actions/upload-artifact@v4
@@ -224,15 +233,9 @@ jobs:
224233
for dir in opencode-*/; do
225234
base="${dir%/}"
226235
if [[ "$base" == *linux* ]]; then
227-
tar -czf "${base}.tar.gz" -C "${base}/bin" .
236+
bun run ../script/package-cli-artifact.ts "$base" "${base}.tar.gz"
228237
else
229-
cd "${base}/bin"
230-
if command -v zip &>/dev/null; then
231-
zip -r "../../${base}.zip" .
232-
else
233-
pwsh -Command "Compress-Archive -Path '*' -DestinationPath '../../${base}.zip'" 2>/dev/null || 7z a "../../${base}.zip" . || true
234-
fi
235-
cd ../..
238+
bun run ../script/package-cli-artifact.ts "$base" "${base}.zip"
236239
fi
237240
done
238241

CONTEXT-MAP.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Read the context documents relevant to the code or decision under review. Do not
55
| Context | Domain document | Primary areas |
66
| --- | --- | --- |
77
| Session Runtime and Client Contract | [`CONTEXT.md`](CONTEXT.md) | `packages/opencode/src/session`, `packages/opencode/src/system-context`, `packages/protocol`, `packages/client`, `packages/sdk` |
8+
| Workflow Orchestration | [`packages/opencode/src/dag/CONTEXT.md`](packages/opencode/src/dag/CONTEXT.md) | `packages/opencode/src/dag`, workflow tool, DAG template validation and packaging |
9+
| Project Memory | [`packages/opencode/src/memory/CONTEXT.md`](packages/opencode/src/memory/CONTEXT.md) | `packages/opencode/src/memory`, Memory-owned worktree lifecycle integration |
810

911
## Contexts created lazily
1012

11-
DAG orchestration does not yet have a dedicated `CONTEXT.md`. The full DAG review must establish terminology from implementation, tests, existing specifications, and accepted decisions before `/domain-modeling` creates one. Add future contexts to this map only when they have a stable document to reference.
13+
Add future contexts to this map only when they have a stable document to reference.

NOTICE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,16 @@ License boundaries
5151
When a file under an AGPL-covered directory imports MIT-licensed upstream
5252
modules, the upstream modules remain MIT; only the AGPL-covered files and
5353
their derivatives carry AGPL obligations.
54+
55+
3. Engineering workflow methodologies
56+
57+
Source: https://github.com/mattpocock/skills
58+
Revision: 84fdeffd12f2ee307994d1eb6feb48173b6e0502
59+
License: MIT
60+
Text: ./third_party/mattpocock-skills/LICENSE
61+
Copyright (c) 2026 Matt Pocock
62+
63+
Selected decision, evidence, debugging, test-first delivery, codebase
64+
design, review, and synthesis methodologies are adapted into product-owned
65+
workflow routing and block contracts. Source metadata and adaptation scope
66+
are recorded in ./third_party/mattpocock-skills/SOURCE.md.

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)