Repository navigation
feat: add private Workstack Compass snapshot producer - #1
Merged
Charliekirk-creator merged 27 commits intoSep 2, 2026
Merged
Charliekirk-creator merged 27 commits into
Charliekirk-creator merged 27 commits into
Conversation
* fix(bin): add a safe owner for custom-check retirement Agents were improvising rm of check files with unset STATE/ID, which wedges headless panes. Unregister validates the id and state directory first. Co-authored-by: Cursor <[email protected]> * no-mistakes(review): Refuse explicitly empty custom-check state overrides * no-mistakes(document): Document custom-check retirement safety contract --------- Co-authored-by: Cursor <[email protected]>
…ory integration proof
Charliekirk-creator
pushed a commit
that referenced
this pull request
Sep 4, 2026
…nguid#3681) * fix(bin): recognize active pipeline fix rounds with unfetched run heads A no-mistakes fix round advances the run head beyond the submitted head, and the pipeline commits in its own checkout, so the task copy never receives the new commit object. fm-crew-state's strict head rule rejected the active row, the coarse runs-list scan skipped it and matched the older failed row at the submitted head, and an active validation read as failed (observed on model-routing-benchmark-hardening: active head ac61c64b vs task copy at fb47636d). fm_nm_runs_status_for_worktree in bin/fm-nm-run-lib.sh now owns runs-ledger attribution: the branch's newest row alone decides, and a newest row whose head cannot resolve locally is recognized only as a provable pipeline-owned continuation - active (running) and anchored by the immediately older row for the same branch having ended at exactly this worktree's HEAD. The reader keeps the axi TOON as full detail for that proven same-branch run. Unanchored, ancestor-anchored, and terminal unresolvable rows stay unattributed, so branch-name coincidence and other tasks' runs never match, and fm_nm_head_matches_worktree keeps its exact prior semantics for teardown (verified by the full teardown suite). Tests: reproduction regression for the unfetched active fix head (reads working via full run-step detail), coarse-path continuation when axi answers another branch, and negative controls for the unanchored active row and the unresolvable terminal row with the historical fallback preserved. Ported onto upstream/main f4d7875, where kunchenguid#3194 independently added the branch_sync custody exemption on the full axi-status path: both mechanisms now coexist, each owning one surface (TOON custody on the full path, the runs ledger on the coarse path). The port deletes the superseded coarse scan-and-skip (nm_runs_status_for_branch) and its now caller-less helpers (fm_nm_head_resolvable, nm_coarse_head_matches_worktree), renames the exemption comment's "the one exemption" phrasing now that a second complementary exemption exists, and points the stale FM_CREW_STATE_RUNS_LIMIT comment at fm_nm_runs_status_for_worktree (judge follow-up #1). The parent coarse-guard test's fixture is the ledger-anchored continuation shape, so its expectation flips to the fixed behavior (working via run-step, never the older failed row); a new mismatched-anchor coarse negative control preserves that guard's original no-anchor protection (pane answers, never the older row). * no-mistakes(document): Clarify pipeline attribution documentation
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.
Intent
Build and ship a Firstmate-owned, local-only producer for authoritative workstack-compass.snapshot.v1 snapshots from live local evidence, without modifying the private Workstack Compass repository. Read only the active FM_HOME plus explicitly bound read-only project roots; use exact Firstmate registry, bounded tasks-axi backlog, task-generation, Data Team Management board, and Data Team Tickets identities without path, title, or heuristic joins. Preserve unavailable and partial evidence honestly: never invent plans, stages, work units, commands, lifecycle relations, next actions, decisions, worker liveness, context, or duration. Validate every complete candidate through the private Workstack executable model without copying its schema, publish atomically to an owner-private mode-0600 file, and refuse malformed, oversized, unsafe, or source-raced inputs without replacing the prior snapshot. Never copy live rows, source prose, status prose, environment values, private paths, credentials, source snapshots, or secrets into Git or generated snapshot contents. Include behavioral regression coverage and public operator and architecture documentation. On success report the private snapshot path and exact local launch command, but do not display snapshot contents, modify source repositories, launch Workstack Compass, merge, or publish.
What Changed
0600, while refusing unsafe, malformed, oversized, or incomplete inputs.Risk Assessment
✅ Low: The local-only producer is well-contained, fail-closed, and backed by behavioral coverage, with no new material source risks identified.
Testing
After an initial 300-second harness timeout, the focused snapshot suite completed with a longer bound against the approved private executable model; ancillary unregister and test-selection behavior also passed. Manual CLI evidence shows atomic mode-0600 publication, the launch command, private-model acceptance, and unchanged read-only repositories without displaying snapshot contents or retaining private paths.
Evidence: Sanitized end-to-end operator transcript using the approved private executable model
Source: Sanitized end-to-end operator transcript using the approved private executable model
Evidence: Focused snapshot behavioral and private-model integration test transcript
Source: Focused snapshot behavioral and private-model integration test transcript
Evidence: Focused custom-check unregister race regression transcript
Source: Focused custom-check unregister race regression transcript
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed (7) ✅
bin/fm-workstack-compass-snapshot.py:1769-IDENTITY_REaccepts leading-dot IDs such as.hiddenand.., although Firstmate's canonicalfm_pr_task_id_validrejects them. Consequently,.hidden.metawith a validspawn_genis published as an exact Firstmate worker identity. This contradicts the required “exact Firstmate ... identities” and “refuse malformed ... inputs” criteria. Apply a task-specific validator matching Firstmate’s canonical task-ID contract at both backlog and metadata ingestion boundaries.bin/fm-workstack-compass-snapshot.py:1818- Every successfully projected worker incrementsomitted, so a source containing only valid, fully included metadata records still emits the claim that “records without exact incarnation identity are omitted.” This contradicts the requirement to “Preserve unavailable and partial evidence honestly.” Count only actually skipped records, and represent unavailable current-state evidence separately when determining completeness and provenance text.🔧 Fix: Validate task identities and correct omission provenance
2 errors still open:
bin/fm-workstack-compass-snapshot.py:1820- The required criterion “Preserve unavailable and partial evidence honestly” is contradicted by returningbool(names)asmeta_present. When the requiredstate/inventory is successfully observed but contains zero metadata files, this reports metadata as unavailable and labels an otherwise complete empty backlog/metadata observation as partial. Track inventory availability independently of record count so an observed empty inventory remains available evidence.bin/fm-workstack-compass-snapshot.py:1323- The required behavior to “refuse malformed, oversized, unsafe ... inputs” is not enforced for the reader's retained dynamic libraries: every dependency asset hasexecutable=False, so its size contributes zero tostaging_size. Multiple dependencies may each pass the 256 MiB individual check while their aggregate reaches tens of gigabytes. Apply the aggregate cap to unique retained dependency descriptors as well as copied payloads and runtime executables.🔧 Fix: Bound reader assets and preserve empty inventory completeness
2 errors still open:
bin/fm-workstack-compass-snapshot.py:1823- The required “Preserve unavailable and partial evidence honestly” behavior is violated when the backlog contains anin_flighttask butstate/has no matching metadata. Firstmate’s lifecycle invariant states that an in-flight row implies<id>.meta; however, this returns metadata as present, zero omissions, and no unavailable current state, causingbuild_documentto report the task source ascomplete. Track exact in-flight backlog identities lacking generation metadata as partial/omitted evidence while still treating a genuinely empty backlog and empty observed inventory as complete.bin/fm-workstack-compass-snapshot.py:1557- The required behavior to “refuse malformed, oversized, unsafe, or source-raced inputs” is not durably bounded: retained descriptor sizes are checked at line 1327, butreader_stage_payloadlater re-reads their mutable sizes without reapplying the aggregate cap. A non-system runtime can grow after validation, causing the staging subprocess to copy well beyond 256 MiB before the eventual race refusal. Capture each retained asset’s validated size at the retention boundary, use only that immutable size in the manifest, and verify descriptor fingerprints around materialization.🔧 Fix: Preserve generation gaps and freeze reader asset sizes
1 error still open:
bin/fm-workstack-compass-snapshot.py:2337- The required criterion says to validate candidates through the private executable model “without copying its schema,” butbuild_documentlocally hardcodes the complete snapshot shape (sources,interfaces,projects,plans, etc.) and only submits it for post-hoc validation. Move candidate construction to a model-owned executable boundary that accepts sanitized evidence, or ask the user to explicitly authorize this duplicated v1 mapping if no such interface exists.🔧 Fix: Delegate snapshot construction to executable model
1 error still open:
bin/fm-workstack-compass-snapshot.py:1935- The required goal is to “Build and ship” the producer while validating through the private executable model “without modifying the private Workstack Compass repository.” This hunk now unconditionally requires a newsnapshot_from_evidenceAPI, but the change only adds that API to the fake test model; the real-model integration remains optional and skipped by default. A validator-only private model reachesprojector is Noneand always fails as an unsupported contract, leaving no usable shipped producer. Confirm that this versioned adapter already exists in the private model, or ask the user to authorize a compatible boundary that can be shipped here.🔧 Fix: Support existing Workstack validator with mandatory integration proof
2 errors still open:
bin/fm-workstack-compass-snapshot.py:2424- The required criterion says to validate through the private executable model “without copying its schema,” butproject_documentagain hardcodes the complete v1 snapshot structure and submits it only for post-hoc validation. Use a model-owned executable projection boundary compatible with the existing interface, or obtain explicit authorization to relax this requirement.bin/fm-check-unregister.sh:48- Artifact checks and removal use the mutable$STATEpathname. A concurrent process can rename the validated state directory and replace it with a symlink beforerm, causing matching files outside the original state directory to be deleted. Anchor validation and unlinking to one retained directory authority, such as a verified working directory or descriptor-relative helper.🔧 Fix: Anchor custom check removal to validated state directory
1 error still open:
bin/fm-workstack-compass-snapshot.py:1926- The required “refuse malformed, oversized, unsafe ... inputs” boundary is incomplete: the supplied model executes after only CPU and file-size limits are set, so a model that allocates memory during import or validation can exhaust host memory before the timeout. The captured backlog reader is likewise memory-unbounded. Apply a memory limit at the earliest shared subprocess boundary so unsafe executable inputs fail without system-wide resource pressure.🔧 Fix: Bound subprocess memory and add exhaustion regressions
✅ Re-checked - no issues remain.
🔧 **Test** - 1 issue found → auto-fixed ✅
tests/fm-workstack-compass-snapshot.test.sh:1595- Required private-model integration evidence could not be produced becauseFM_WORKSTACK_COMPASS_TEST_APPis unset. The contract-compatible executable fixture demonstrates behavior but cannot prove compatibility with the approved private Workstack executable model. Provide its absolute repository root and rerun the focused test.bash tests/fm-workstack-compass-snapshot.test.sh— exercised snapshot generation, truthfulness, confinement, bounds, atomic replacement, and race refusal; halted at the mandatory private-model integration due to the unset approved-root variable.bash tests/fm-check-unregister.test.sh— exercised safe custom-check removal, including state-directory replacement.FM_HOME=<fixture-home> bin/fm-workstack-compass-snapshot.py --workstack-root <fixture-app> --project-root ...— manually verified operator output, mode 0600 publication, no launch, omitted inferred surfaces and sensitive fixture values, source immutability, and preservation after model rejection.git status --short— confirmed testing left no worktree artifacts.🔧 Fix: Validate snapshots against private Workstack executable model
✅ Re-checked - no issues remain.
InitialFM_WORKSTACK_COMPASS_TEST_APP="$APPROVED_PRIVATE_ROOT" bash tests/fm-workstack-compass-snapshot.test.shreached the safety scenarios before the 300-second harness timeout.RetriedFM_WORKSTACK_COMPASS_TEST_APP="$APPROVED_PRIVATE_ROOT" bash tests/fm-workstack-compass-snapshot.test.shwith a sufficient 900-second timeout; the complete focused suite finished successfully.bash tests/fm-check-unregister.test.shbash tests/fm-test-run.test.shbin/fm-test-run.sh --list --changed --base 0866a770234502364c268a768cb7c66cc321c629selectedtests/fm-workstack-compass-snapshot.test.sh.Performed an end-to-end operator invocation using sanitized live-source fixtures and the approved private Workstack executable model; verified emitted snapshot path and launch command, mode 0600, private provider loading with no integrity issues, and unchanged source/private repository state.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.