---
title: "2026-09-18 Factory stack restacked with current main behavior"
description: "Resolve PR406 conflicts with rewritten PR404 while preserving recent Factory fixes."
image: "https://docs.virdx.dev/img/virdx-social-card.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.virdx.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 2026-09-18 Factory stack restacked with current main behavior

## Work Done

User authorized restacking after conflict investigation. PR404 had been rewritten
onto newer main and updated to22369632, while PR406 still carried the old framework
history. Replayed only consumer commits after old framework2e9fd8b2; resolved ten
conflicting files by retaining the replacement architecture, then reconciled main's
runtime changes rather than blindly selecting the consumer tree.

[PR404](https://github.com/virdx/mono/pull/404) is now08cbe596: one backend metadata
change adds virdx.dev/preemptible=true, preserving #407 in the shared workflow builder.
Created in a separate clean temporary worktree, not the user's existing framework
checkout: /tmp/factory-framework-preemptible-01a0b213. Normal push; native framework
Ruff/mypy/format checks pass. Existing framework checkout was not reset to remote.

[PR406](https://github.com/virdx/mono/pull/406) now9f31d61f, rebased on08cbe596 and
pushed with explicit force-with-lease against1f42d46a. GitHub reports MERGEABLE;
mergeStateStatus BLOCKED is separate CI/review gating, not merge conflicts. Its diff
contains only README and apps/factory changes, no duplicated framework changes.

Preserved #400: six histo jobs request no GPU, GrandQC device explicitlycpu, RPE and
CHIMERA memory32GiB; Viseg remains1xADA/16GiB. Histo0.0.125 and virdx-ome0.0.24 pinned,
lock regenerated. Per-slide persistence retained; restored duration logs, quiet
httpx/pyvips logging, cleanup after failed attempts. Numeric scratch directories
already prevent scan-ID traversal. Kept seven explicit registrations and published
SDK from review1f42d46a. Kept current lint guards (complexity/private imports/ast-grep)
and pythonLint cache input. Removed obsolete import-factory.api test target in line
with user's no-test-target direction; old orchestration remains deleted.

Formatting/lint/types/build, boundaries, locked model-free startup with14routes,
CPU/GPU resource checks, static preemptible-label check and merge-tree pass. Bun
install --frozen-lockfile was needed for main's new ast-grep CLI. Existing advisory
Viseg assert warnings remain. No image/GPU/cluster run. Model and GitOps release
blockers are unchanged. User dirty framework manifest restored byte-for-byte and
left unstaged. Backup ref backup/factory-histo-before-restack-1f42d46a retains old head.

## Lessons Learned: Pitfalls

Updating a stack base on GitHub can rewrite its commits without updating children;
the old base may no longer be the merge-base. Use the known previous stack boundary
for rebase --onto, not a blind default rebase that replays framework commits too.
Removed old orchestration files can contain newer behavior that must move into the
replacement, particularly workflow scheduling and inference resource settings.

## Lessons Learned: Improvements

Compare base tree changes and current main fixes before conflict resolution. Verify
the new base is an ancestor and GitHub mergeability, preserve user edits outside the
index, and use an explicit expected remote SHA for rewritten branch pushes.

Source: https://docs.virdx.dev/knowledge/inbox/2026-09-18-infrastructure-factory-restack/index.mdx
