feat(aigw): overlay-patch tool, ai-assist source env, caproni staging license
What
Three additions proven during live upstream AIGW fix validation (2026-07), promoted from scratch tooling into the skill, plus the standard they serve:
gce/fixtures/overlay_patch.py-- the strict find-exactly-once overlay patcher thatgce/aigw.mdhas described in prose since the pattern landed. TOML spec in (absolute container paths, one[[patch]]per find/replace), thin overlay image out; anchor drift hard-fails instead of silently mispatching.just aigw dev [BRANCH]-- ai-assist source env on the VM (python3.12 toolchain + poetry + disposable depth-1 clone, or a pre-placed tree at~/ai-assist). Fills the source-dev gap for the gateway: the skill had a dev base for gitlab-org/gitlab only. Documented in aigw.md's new source-dev section with the detached-run pattern.configure_staging_subscriptioncaproni arm -- staging license files previously activated only on omnibus (the function warned and skipped otherwise). The caproni arm setsCUSTOMER_PORTAL_URL+GITLAB_LICENSE_MODE=teston the three Rails deployments and waits out the rollouts before the license step proceeds.- The evidence standard (aigw.md) -- the red/green bullet generalized into the five-step standard the tooling exists to serve: red first, green plus the project's own lint gates, shipped-image E2E, mutation-discrimination for guard tests, negative path.
Validation
just cigreen locally (shellcheck warning+, bash -n, ruby -c, py_compile, frontmatter, sims-check).- Live proof on a throwaway caproni sim (2026-07-14), driven from this branch's justfile end to end:
- Overlay build (positive): the documented
find-based path discovery located/home/aigateway/app/lib/context/llm_operations.py(correcting a guessed/app/...-- the doc step earns its place); the tool patched the file and built the overlay; a content check inside the image confirms the patched line present and the old block gone. - Anchor-drift guard (negative): a one-comment perturbation of the find block hard-failed with the drift message, exit 1, no image tagged.
- Overlay boots via the skill path:
SIM_AIGW_IMAGE=localhost/aigw-proof:dev just aigw start-> healthy in 9s, Rails wired. just aigw dev: detached bootstrap to=== READY ===(python3.12 toolchain, poetry env, depth-1 clone,install --with test,lint).- Caproni staging license:
SIM_LICENSE_MODE=staging just license <file> duo_enterprise->license activated: plan=ultimate; all three deployments verified carryingGITLAB_LICENSE_MODE=test+ the stagingCUSTOMER_PORTAL_URL;License.currentconfirmed in Rails. - Teardown verified (zero running instances).
- Overlay build (positive): the documented
- Observed pre-existing wrinkle (not this branch): the addon-seat step after activation raises
addon catalog entry missingon a fresh instance -- filed as #4.
Closes #3 (closed)