Repository navigation
feat(workspace): add DEVKIT_WORKFLOW knob (gitflow default / trunk opt-in) - #1212
Merged
Merged
Conversation
De-risk the DEVKIT_WORKFLOW knob (gitflow | trunk) for epic #1205: a local git simulation proves the trunk release topology (cut release/X.Y.Z from main, merge back, tag; no dev branch) with the #617 advance guard and #590 Unreleased preservation intact; a render_workflow_model() prototype performs the anchored dev->main rewrite + sync-main-to-dev copy-exclude and is verified actionlint-clean with zero residual heads/dev and the #991 invariants preserved. No production wiring (that is #1207/#1208). Refs: #1206
Skeleton mirroring test_ci_runner.py's executed-bash style: 9 green tests drive the spike render_workflow_model() prototype against a copied scaffold tree and assert the full trunk shape (no sync-main-to-dev.yml; prepare-release forks from main with zero residual heads/dev; ci/codeql PR filters exclude dev; sync-issues default main; SKILL base main; pre-commit drops (?!dev$)) plus a gitflow byte-identical guard. Two xfail(strict) tests name the production seams so they auto-flip when wired: #1207 (DEVKIT_WORKFLOW manifest key) and #1208 (render wiring in init-workspace.sh). Refs: #1206
Add the `--workflow gitflow|trunk` flag to both install.sh and init-workspace.sh (parse, enum validation, and forwarding from install.sh to init-workspace via CMD), and gate the gitflow `dev` branch on it: the new-repo `git branch dev`, the missing-dev warning, and the push hint drop `dev` in trunk. `git init -b main` is unchanged. Resolution/render wiring lands in the follow-up commits. Refs: #1209
Ship the opt-in `DEVKIT_WORKFLOW=` key in the scaffold `.vig-os` (empty => gitflow default) and resolve it in init-workspace.sh and install.sh: flag > persisted manifest > gitflow. Mirror the DEVKIT_MODE guards — a loud enum guard on a corrupt persisted value and a contradiction guard that refuses an explicit --workflow differing from the persisted model outside --preview/--smoke-test. The resolved value is written back only for trunk, so a gitflow consumer's .vig-os stays byte-identical (no new non-empty line). Refs: #1207
Port render_workflow_model() into init-workspace.sh as a sibling of render_codeql_matrix() and invoke it after the rsync copy: in trunk it retargets the copied release workflows dev -> main (prepare-release, ci, codeql, sync-issues), the branch-naming skill and the pre-commit branch guard via anchored sed, and scrubs the inert dev step-names/comments in prepare-release so a trunk repo carries no dev cruft (/dev/null and the dev_sha/DEV_SHA variable names are preserved). sync-main-to-dev.yml is copy-excluded and pruned on a gitflow->trunk upgrade, and the --force preview mirrors both. gitflow is a byte-for-byte no-op. The now-redundant spike prototype scripts are removed (SSoT); FINDINGS.md is kept as the record. Refs: #1208
…W knob Rewrite test_workflow_model.py to scaffold real gitflow/trunk workspaces via init-workspace.sh (executed-bash style, mirroring test_ci_runner.py) instead of the removed spike prototype, flipping the two xfail seams (#1207 manifest key, #1208 render wiring) to real passing tests. Cover the full trunk shape with zero residual heads/dev, the gitflow default-path byte-identical guard, the enum and contradiction guards, the conditional writeback, and the sync-main-to-dev exclude + gitflow->trunk prune. Record the feature in the changelog Unreleased section. Refs: #1205
…w model Parametrize the suites that assumed the gitflow (long-lived dev) shape so they also cover DEVKIT_WORKFLOW=trunk, without weakening the gitflow assertions: - extract the init-workspace scaffold invocation into a shared tests/workflow_scaffold.py (SSoT reused by test_workflow_model.py and the trunk-parametrized suites below) - test_install_script.py: add a trunk integration fixture + case asserting a trunk install creates main only (no dev); gitflow still creates both - tests/bats/install.bats: assert the dev-branch creation + push hint are gated on the workflow model, and --workflow is forwarded (dry-run) - test_workflow_sync_checkout.py: scope to gitflow and positively assert a trunk scaffold omits sync-main-to-dev.yml - test_scaffold_lint.py: scope the sync-main-to-dev ref: dev fixture to gitflow - test_workflow_prepare_extension.py: assert the release base is main under trunk (dev under gitflow) and the hook DAG survives the render - tests/bats/init-workspace.bats: new trunk coverage (omits sync-main-to-dev, #991 invariants on the rendered prepare-release, gitflow->trunk DELETIONS preview, contradiction guard both directions); #991 TEMPLATE_DIR assertions left untouched release-core is dev-free and untouched by the trunk render, so test_release_core_sync_dispatch.py needs no change. Refs: #1210
c-vigo
added a commit
that referenced
this pull request
Jul 20, 2026
…el (#1215) ## Summary Unfreezes release/1.4.0 by merging `dev` into it, deliberately pulling epic #1205 (per-consumer `DEVKIT_WORKFLOW` gitflow/trunk model, merged to dev via #1212) and the renovate `github-backup` 0.64.0→0.64.2 bump (#1213) into the 1.4.0 release. **This deviates from the epic's documented 1.5.0 target** — accepted trade-off: an rc5 was required anyway (the branch is five fixes past rc4), and gitflow consumers get a provable byte-for-byte no-op. ## Gates cleared before this merge - **Dev composite tree proven green**: the merged dev head `4ac2ca90` (feature + renovate bump as one tree) passed a full dispatched `ci.yml` run ([29726877354](https://github.com/vig-os/devkit/actions/runs/29726877354)) — the pre-merge PR checks had only tested stale bases. - **Epic completeness audited**: every acceptance criterion of #1206–#1211 mapped to merged code; gitflow no-op pinned by `test_gitflow_scaffold_matches_default_path` and `test_gitflow_render_files_are_byte_identical_to_template`. Sub-issues remain open only as bookkeeping (dev-PR `Refs:` doesn't auto-close). ## Merge composition Two real conflicts, composed to preserve both sides: - `assets/init-workspace.sh`: kept #1196's `MODE_CONFIG_EXCLUDES` array (supersedes dev's older explicit exclude blocks) **and** appended #1205's trunk-only `sync-main-to-dev.yml` exclude + preview skip-guard; `render_workflow_model()` and its invocation intact. - `tests/bats/init-workspace.bats`: additive union of #1195's chmod-scope test and #1205's six trunk tests. CHANGELOG surgery: dev's two Unreleased entries moved into the `[1.4.0]` section (Added/Changed), `## Unreleased` restored to the empty skeleton (#590 invariant); `assets/workspace/.devcontainer/CHANGELOG.md` re-synced byte-identical (sync-manifest hook green). All seven release-branch hardening fixes (#1190 #1193 #1199 #1200 #1201 #1202 #1204) survive. ## Verification - Targeted suites: 66 passed (`test_workflow_model`, `test_install_script`, `test_workflow_prepare_extension`, `test_workflow_sync_checkout`) - Full pytest: 1098 passed, 28 skipped; 3 failures all environmental/pre-existing (2× `vig-utils` `TestFindRepoRoot` env, 1× `test_manifest_files` stale local image — CI rebuilds) - bats: 331 ok, 0 not ok (`init-workspace.bats`, `install.bats`) - `pre-commit run --all-files`: fully green - Containment: `git log HEAD..origin/dev` empty; diff vs dev = release fixes + changelog structure only ## After merge Cut **rc5** (required regardless of this PR) and extend rc validation with the trunk-render suites + a gitflow-consumer scaffold byte-identity check. Refs: #1205
This was referenced Jul 20, 2026
Closed
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.
Implements epic #1205 — a per-consumer
DEVKIT_WORKFLOWknob selecting the branching/release model. gitflow stays the unchanged default; trunk is opt-in.What it does
DEVKIT_WORKFLOW=gitflow|trunk, empty ⇒ gitflow (existing consumers'.vig-osstays byte-identical).devintegration branch, cutrelease/X.Y.Zfromdev, RC train, finalize→main+tag,sync-main-to-devback-merge.feature|bugfix|chorestraight tomain; releases STILL happen but cutrelease/X.Y.Zfrommain, RC on it, merge back intomain+ tag. Only thedevbranch andsync-main-to-dev.ymldisappear; the whole downstream tag/build/publish/promote chain is unchanged (alreadyrelease/* → main).How (design)
Realized entirely at scaffold time (mirrors
DEVKIT_MODE) — an anchoreddev→mainrender of the scaffolded workflows/skill/pre-commit plus async-main-to-dev.ymlcopy-exclude; NO resolve-toolchain runtime wiring, NO workflow twin. Enabled by the verified fact that everydevreference inprepare-release.ymlis a plain branch literal (incl. the #617 read-after-write guard). ADR:docs/rfcs/ADR-workflow-model.md.Sub-issues delivered (spike #1206 + #1207–#1211)
render_workflow_model()in init-workspace.sh + sync-main-to-dev exclude/prune +--forcepreview mirror.--workflowflag on install.sh/init-workspace.sh + dev-branch creation gating.test_workflow_model.py(19) end-to-end.RELEASE_CYCLE/DOWNSTREAM_RELEASE/MIGRATION"Workflow models", README/CLAUDE), ADR, plan doc.Verification
test_workflow_model.pyand the trunk-extended suites; the gitflow scaffold is byte-identical to today (default-path regression guard). bats: install 99 ok, init-workspace 229 ok (CI + release workflows hard-coupled to the container image regardless of DEVKIT_MODE #991 template invariants intact).vig-utilsTestFindRepoRoot) — pre-existing + environmental, in a package this PR does not touch.Notes
init-workspace.sh/install.sh, so they're consolidated into this one PR (per-sub-issue commits kept for traceability) rather than conflict-prone parallel PRs.dev— documented cleanup in MIGRATION).Refs: #1205, #1206, #1207, #1208, #1209, #1210, #1211