Skip to content

feat(pipeline): headless command and the slow end-to-end test - #13

Merged
anthonyma94 merged 33 commits into
masterfrom
card/pipeline-e2e
Dec 5, 2026
Merged

anthonyma94 merged 33 commits into
masterfrom
card/pipeline-e2e

Conversation

@anthony-hermes

@anthony-hermes anthony-hermes Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What this lands

One command takes a video to an SRT with the real chain, and CI proves it on CPU.

  • subsmith-headless job.json (new console script, src/subsmith/cli.py) reads a
    job.json (JobConfig), resolves the language pair from the shipped profiles, and runs
    probe, extract, transcribe, glossary, translate, fit, write. Exit 0 finished, 1 the
    pipeline refused the input, 2 the job description or endpoint settings are unusable,
    each with the name in the message.
  • src/subsmith/pipeline/transcribe.py: faster-whisper behind the Transcriber
    protocol. Device resolution asks CTranslate2 (cuda when a device answers, else cpu with
    int8), word times become whole milliseconds, and a segment that misses one of its words
    is widened instead of the word being clamped or dropped.
  • src/subsmith/pipeline/glossary.py: candidates from pass one (quoted strings,
    mid-sentence names, a name repeated at a line start, anything that also appears
    lowercase is dropped as a sentence capital), glossary.tsv with a header, loaded and
    extended rather than replaced, used as hotwords for pass two.
  • src/subsmith/pipeline/output.py: qa.json measured from the finished cues and
    recognized words (cue count, covered duration, average cps, longest line, overlaps,
    max cue-to-word delta, trims, condenses, glossary audit, energy onset against the first
    cue, device, model, offset, untranslated count, pass disagreements), plus segments.json
    and cues.json.
  • src/subsmith/pipeline/run.py: the chain and its two cross-lane rules, the offset
    applied at write time only, and a named failure when recognition returns nothing.
  • tests/pipeline/test_e2e.py (marked slow): builds a 30 second mp4 with espeak-ng and
    ffmpeg, runs the tiny model twice on CPU, and translates against a canned,
    id-faithful translator. The weights are resolved with local_files_only=True, so the
    test fails by name instead of downloading.
  • CI installs espeak-ng, caches and provisions the tiny weights, and runs the slow test
    after make check, so the CPU path is proven on every pull request.

make check now selects -m 'not slow'; the slow suite is opt-in, exactly as the card's
acceptance command runs it, and CI runs -m slow tests in its own step so the six ingest
integration tests that were previously in the default gate stay covered.

Evidence

$ pytest -q -m slow tests/pipeline/test_e2e.py && make check
.                                                                        [100%]
== ruff format     36 files already formatted
== ruff check      All checks passed!
== mypy            Success: no issues found in 36 source files
== pytest          282 passed
check: pass
exit 0

The slow run itself: device=cpu model=tiny segments=6 cues=6 wall=2.6s, six cues, zero
overlaps, zero trims, first_speech_onset_ms 0, max_cue_to_word_delta_ms 0, and an SRT
that parses with sequential indices and non-overlapping times.

CI: run 47270137254 on e820cf4 is green end to end, including
pytest -q -m slow tests (7 passed: this test plus the ingest lane's six real-ffmpeg
integration tests) and make check (282 passed).

Rulings

  • This branch merges card/fit-cues (needed by the chain) and is based on
    card/translate. It must be retargeted to master once feat(pipeline): fit chain and atomic SRT writer #7, feat(languages): load profile pairs and compose the translation prompt #8 and feat(pipeline): chunk, validate and retry id-keyed translation #12 land.
  • The translation endpoint comes from three environment variables
    (SUBSMITH_TRANSLATE_BASE_URL, SUBSMITH_TRANSLATE_API_KEY,
    SUBSMITH_TRANSLATE_MODEL) until the settings lane ships its TOML file. The job
    snapshot in job.json therefore does not yet carry the endpoint.
  • Glossary rendering proposals (lane 03's "ask the endpoint once per batch") are not
    requested in this card; rows are written with an empty target and used as hotwords and
    context only, which the lane allows. Filed as a follow-up card rather than invented
    prompt text here.
  • The condense hook is not wired: fit_cues accepts condenser=None, so an over-long
    translation is split, extended, then trimmed with the trim logged. Same follow-up.
  • av<19: faster-whisper 1.2.1 calls av.open(..., metadata_errors=...), removed in
    av 19. A bound, not a pin.
  • The e2e uses a test-only en -> ko profile pair written into a temp directory, because
    the shipped files are role-specific (ko is a source, en a target). The fixture's
    speech is English because the box has no usable Korean synthesizer; the translation is
    canned Korean.
  • AGENTS.md could not be updated from this run: the write to an agent-instruction file
    waits for the owner's approval, so the headless command and the slow-test provisioning
    live in the module and test docstrings until he lands that section.

Turn translated text plus word times into readable cues that do not overlap and
do not lose content silently, then write them as SRT.

- CuePolicy carries the target profile's width, line, speed and duration
  numbers; the fit lane names no language and defaults only the two timing
  constants (120 ms split pause, 40 ms extension guard).
- build_drafts takes every cue edge from word times, falls back to the source
  text when a translation is missing, and resolves an overlapping source span
  by pulling back the earlier end only.
- The chain keeps a fitting cue, splits inside a real pause when both halves
  stand alone, extends into the silence before the next cue, condenses once
  through an injected hook (rejected if a digit or glossary term is lost), and
  trims last, logging the before and after lengths.
- fit_cues renumbers cues from one in time order and remaps every adjustment
  to the surviving cue id.
- The writer renders HH:MM:SS,mmm with unbounded hours, checks order and
  overlap before touching the target, writes through a same-directory temp
  file, refuses an existing file without the flag, and keeps the old file as
  .bak when overwritten, restoring it if the final rename fails.
- 54 tests, including a strict SRT reader, a 100 hour cue, and a simulated
  rename failure.
Language rules and cue numbers live in TOML files, and the prompt that carries them is built in one place.

- ko.toml and en.toml follow the design shape: identity, role fragments and the five cue numbers, with the English no-em-dash rule in en.toml rather than the base text.
- profile.py validates every file with pydantic, refuses a pair that lacks either file, and refuses a source without source_rules or a target without target_rules so no rule is dropped silently.
- prompt.py composes base rules, source fragment, target fragment, context, glossary and previous lines in that fixed order, omitting empty optional sections and capping previous lines at three.
Twenty cues per request, an answer keyed by the string form of the segment id, and a
retry that hands the validator's own complaint back to the model.

- translate.py chunks the segment list without touching ids, rejects a repeated id,
  validates every answer against the exact id set with a pydantic model (missing, extra,
  renumbered, non-canonical, non-string and blank values all named), retries once with
  that message in the request, then asks for each unresolved id alone.
- A line that still cannot be translated keeps its source text and carries an
  "untranslated" QA flag; the chunk is recorded with its ids and error, and the job
  continues to the next chunk.
- translated.json is rewritten atomically after every chunk, with the chunk index and
  attempt that produced each line.
- openai_client.py speaks the chat-completions shape against a caller-chosen base URL
  through a ChatClient seam, always asking for json_object; an answer that is not a JSON
  object is a rejection so the retry carries the parser's complaint, while an unreachable
  endpoint is a request failure retried without a correction.
- 38 tests, no network: a scripted chat client and a stub SDK factory cover the client,
  and tests/fakes.FakeTranslator covers the chunk, retry and fallback paths.
Adds the stages the chain needed and the command that runs them:

- transcribe: faster-whisper behind the Transcriber protocol, device resolved
  from CTranslate2 (cuda when present, else cpu int8), word times in whole
  milliseconds with the segment widened to cover every word.
- glossary: pass-one candidates (quoted strings, mid-sentence names, a name
  repeated at a line start), written with a header, loaded and extended rather
  than replaced, and used as hotwords for the second pass.
- output: qa.json measured from the cues and words (overlap, cue-to-word
  delta, trims, condenses, glossary audit, energy onset) plus the retained
  segments.json and cues.json.
- run: probe, extract, transcribe twice, glossary, translate, fit, write, with
  the container offset applied at write time only and a named failure when
  recognition returns nothing.
- cli: `subsmith-headless job.json`, endpoint from three environment
  variables, exit 0/1/2 split the way the check script splits them.

The one slow test builds a 30 second mp4 with espeak-ng and ffmpeg, runs the
tiny model twice on CPU, and translates against a canned id-faithful
translator. It resolves the cached weights with local_files_only=True, so a
miss fails by name instead of reaching the network.

faster-whisper 1.2.1 calls av.open(metadata_errors=...), which av 19 removed;
the dependency carries av<19 until faster-whisper's own floor moves.
The workflow installs espeak-ng (the slow fixture's speech), caches the Hugging
Face hub, provisions the tiny weights before the gate, and runs
`pytest -q -m slow tests/pipeline/test_e2e.py` after `make check` so the
CPU-only path is proven on every pull request.
@anthony-hermes
anthony-hermes Bot requested a review from anthonyma94 as a code owner December 4, 2026 04:33
The first run of the check workflow sat in `apt-get` for more than fifteen
minutes with no step update, which occupies the job until GitHub's own timeout
and tells us nothing. A twelve minute cap turns that into a visible failure the
next attempt can be judged on.
Marking the suite `-m 'not slow'` by default moves the six real-ffmpeg ingest
integration tests out of `make check` along with the new end-to-end test. The
slow step now runs `-m slow tests`, so both stay covered in CI and the default
gate stays free of ffmpeg and model work.
Master's #8 rewrote the languages lane, so the add/add conflicts in
languages/__init__.py, languages/profile.py, pipeline/prompt.py and their tests
resolve to master's versions; this branch's earlier language implementation is
superseded and the flat en.toml/ko.toml copies are removed.

The translation code is kept. openai_client.py now compares the request language
against profile.tag instead of the removed profile.code. make check passes.
…ne-e2e

The base now carries master's rewritten languages lane, so the add/add
conflicts in cues.py, srt.py and their tests resolve to the base's versions.
The headless chain is kept and ported to the new profile API: run.py compares
against profile.tag, uses profile.whisper, and supplies MAX_DIALOGUE_LINES as
the policy's screen rule. make check passes.
@anthony-hermes
anthony-hermes Bot added this pull request to stack #21 December 5, 2026 00:17
@anthony-hermes

anthony-hermes Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Applied the same test standard on this branch, after merging the trimmed base and the cleanup branch.

285 tests, make check exit 0, CI green.

Base automatically changed from card/translate to master December 5, 2026 04:17
@anthony-hermes

anthony-hermes Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Review items implemented; the glossary candidate mechanism (items 4 and 5) is held for the benchmark.

Changed

  • subsmith-headless is now subsmith-cli: the console script in pyproject.toml, the argparse prog, both error prefixes, and the test docstring. The windowed entry point stays under gui-scripts.
  • glossary.tsv stays three columns and gains a UTF-8 BOM (Excel on Windows reads BOM-less UTF-8 as ANSI) and field escapes (\\, \t, \n, \r). Readers in test_glossary, test_run and the e2e switch to utf-8-sig. GL3.7 added.
  • New subsmith.paths: PlatformDirs(appname="subsmith", appauthor=False), the three roots, and the leaves settings.toml, jobs/<32 hex>, models/, logs/. No cache root; HF_HOME points at models/hf. Job ids are generated, output stems are sanitized for Windows reserved names, and a job directory carries a lock for the run. PK9.8 and WK7.9 added.
  • job.json paths expand ~ and the platform's variables, then resolve against the job file's directory through one helper. A path that cannot resolve exits 2.
  • run_job takes the directory lock and refuses a second live run with the directory named.

Merge
origin/master merged. PR #12 landed and the base auto-retargeted to master, so the branch diff no longer carries the translate commits. The add/add conflicts in tests/pipeline/test_openai_client.py and tests/pipeline/test_translate.py were resolved by taking master's versions; those are #12's shipped tests, not this branch's.

Gate, run on forge in the branch worktree

== ruff format     48 files already formatted
== ruff check      All checks passed!
== mypy            Success: no issues found in 48 source files
== pytest          335 passed, 7 deselected
check: pass
exit 0

CI run 47481252120 on 21e88da is green, including the slow end-to-end step (8 seconds).

Held
Items 4 and 5 (candidate extraction and its tests) wait for the rules-versus-LLM benchmark. This push does not touch extract_candidates. AGENTS.md was not edited; master's version arrived through the merge.

Replace extract_candidates with a TermNominator seam. One call after pass one returns a headword, an English rendering and a kind per term; merge_glossary keeps only terms that occur literally in the pass-one text, normalises to NFC, deduplicates and caps the new rows. A failed nomination leaves the job valid and records the error in qa.json. The translation prompt now says a glossary row is a stem, so the source language's honorifics stay attached.
@anthony-hermes

anthony-hermes Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

The glossary benchmark is in, and the rule path is replaced with endpoint nomination.

Benchmark (forge, 38:00-43:00 of the Jihyo episode, 105 segments, large-v3 CPU)

  • Rules found 1 term (JYP); the endpoint nominated 15, all literal in the transcript.
  • Blind judge: LLM 8, rules 3, no ties; LLM 8, no glossary 3. Eleven batches of ten segments; 6 judged by deepseek-v4.1-flash, 5 fell back to gpt-6-luna (the translator) when the judge returned empty content.
  • The automated consistency metric is 1.000 for every variant because gpt-6-luna already renders names stably. The surface metric that favours the LLM (1.000 vs 0.952) is misleading: at [69], [85] and [101] the Korean says 지효 씨, so Jihyo-ssi is the profile-correct rendering and the LLM variant drops it. That is the gap the new prompt line closes.
  • Report, scores and the four SRTs: /home/hermes/.hermes/work/glossary-bench/jihyo/.

Implemented

  • extract_candidates and its regexes are deleted. TermNominator is a seam beside the transcriber and translator; OpenAITermNominator makes one call after pass one with the job context and the transcript, asking for a dictionary headword, an English rendering and a kind.
  • merge_glossary keeps only terms that occur literally in the pass-one text, normalises to NFC, deduplicates casefolded and caps new rows at 40. An existing row is never touched.
  • A failed nomination leaves the job valid and writes glossary_warning into qa.json.
  • The translation prompt now says a glossary entry is a stem and that the source language's honorifics and particles stay attached (GL3.10).
  • CLI wiring shares one endpoint client between the translator and the nominator; an injected translator with no nominator runs without a glossary.
  • Spec 03: candidate extraction rewritten; GL3.8 (literal gate), GL3.9 (failure is a warning), GL3.10 (stem).
  • Tests: nominator parsing, one retry, transport failure and an empty transcript; the literal/NFC/cap gate; the run-level warning; the CLI wiring; and a canned nominator in the slow e2e so the glossary path is exercised end to end.

Gate

== ruff format     48 files already formatted
== ruff check      All checks passed!
== mypy            Success: no issues found in 48 source files
== pytest          343 passed, 7 deselected
check: pass

Slow suite on forge: 7 passed. CI run 47486582208 on 5991bf9 is green, including the slow end-to-end step (8 seconds).

The benchmark's caveat: the 8-3 preference is real, but half the batches were judged by the translator model, and most cited reasons are general fidelity rather than terminology. The mechanism is the right one for Korean; the measured consistency benefit is small with this translator.

The glossary block no longer carries an honorific policy. It says an entry is a stem and the source and target profile rules decide how it appears in a line. The nomination prompt asks for the dictionary form, not an inflected form. Korean keeps its -ssi/-nim rule in ko.toml; no new profile field and no language list in the pipeline. The spec also states that v1 has one glossary per job, with no shared or series-level file.
@anthony-hermes

anthony-hermes Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up: glossary policy now lives in the language profiles.

  • The glossary block says an entry is a stem and the source and target rules decide how it appears in a line. No honorific sentence in the pipeline.
  • The nomination prompt asks for the dictionary form, not an inflected form. Korean keeps -ssi/-nim in ko.toml; another language writes its own rule. No new profile field and no language list in the glossary code.
  • Spec 03 now states one glossary per job, loaded on a re-run of the same job. No shared or series-level file in v1, and hand editing is a side effect, not a supported workflow.

Gate on forge: 343 passed, 7 deselected. CI run 47489116187 on f91830f is green, including the slow end-to-end step.

@anthony-hermes

anthony-hermes Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Hermes PR Review

Reviewed commit: 3b1286ee31c61cc12e2e5a858cc705a1f0c63b7d

Review status: No actionable findings

Executive summary

PR 13 makes the headless path real. subsmith-cli job.json reads a job description and runs probe, extract, transcribe, glossary, translate, fit and SRT output without a window, sharing one endpoint client between the translator and the term nominator. It adds the CLI, a paths/job-lock module, an LLM glossary nominator, the QA/artifact writer, a faster-whisper adapter, run_job, and a slow CPU end-to-end test that CI provisions. The diff is 33 files, 3771 insertions and 888 deletions.

Pass 1 found two issues: a Medium where the job snapshot could rewrite the caller's job.json and persist --overwrite, and a Low where the existing-SRT error named a Python keyword. Both are fixed in 3b1286e. Pass 2 verified the fixes against the code, found no regression, and found no new issue. make check exits 0 with 354 tests passing.

This is not an approval; the merge decision is the human's.

Findings

No actionable findings. The two pass-1 findings are fixed and verified below.

Previously reported findings

ID Finding Pass 1 Pass 2
PR-001 Job snapshot can overwrite the caller's job.json and persist --overwrite Confirmed, Medium Verified fixed
PR-002 Existing-SRT error names a Python keyword to CLI users Confirmed, Low Verified fixed

PR-001 fix: run_job takes source_path, resolves it against job_dir/job.json, skips the snapshot write when they are the same file, and removes the CLI-only overwrite field from the snapshot payload. Tests cover the snapshot content, a source job inside its job directory, and a second run without the flag.

PR-002 fix: the CLI catches SrtExistsError before the generic pipeline errors and prints pass --overwrite to replace it. The library message is unchanged for programmatic callers.

Verification

  • git rev-parse HEAD: 3b1286ee31c61cc12e2e5a858cc705a1f0c63b7d, the reviewed head.
  • git diff --stat 052fb231..HEAD: the PR's 33 files plus the fix commit's 4 files.
  • git diff f91830f..3b1286e: exactly 4 files, 82 insertions and 3 deletions (cli.py, run.py, test_cli.py, test_run.py).
  • PATH=/home/hermes/.hermes/work/subsmith/.venv/bin:$PATH make check: exit 0. ruff format: 48 files clean. ruff check: all checks passed. mypy: no issues in 48 source files. pytest: 354 passed. check: pass.
  • Targeted pytest on tests/pipeline/test_cli.py and test_run.py: 30 passed, including the 4 tests added by the fix.
  • Code-path reads confirmed source_path=arguments.job at cli.py:174, the resolved-path guard and overwrite removal at run.py:163-168, and the SrtExistsError handler at cli.py:179-184.
  • Reviewer route: edi/alt via custom:litellm.
  • Not run: the slow-marked end-to-end test, which needs provisioned tiny weights and ffmpeg. make check excludes it by configuration; CI runs it separately.

Implementation walkthrough

Overview

The PR turns the headless path into a usable command. It adds subsmith-cli, which reads a job.json, resolves the language pair from shipped profiles, and runs probe, extract, transcribe, glossary, translate, fit and SRT write. The glossary is nominated by the configured endpoint rather than by regexes. A slow end-to-end test builds a 30 second mp4 locally, runs the tiny model twice on CPU, translates with a canned id-faithful translator, and parses the SRT strictly.

Execution flow

  1. cli.main parses job.json and --overwrite; load_job validates the config and resolves input_path and job_dir against the job file's directory.
  2. load_pair loads the shipped TOML profiles and rejects a pair missing a role-specific prompt fragment.
  3. Without an injected transcriber, configure_model_cache points HF_HOME at the app-data models directory and FasterWhisperTranscriber resolves the device through CTranslate2.
  4. Without an injected translator, build_endpoint reads SUBSMITH_TRANSLATE_*; one client is shared by the translator and nominator. Missing variables exit 2 with all three names.
  5. run_job checks job tags against pair tags, creates the job directory, takes a non-blocking JobLock, and calls _run_job with the CLI's source path.
  6. _run_job writes the guarded snapshot, ingests to a verified 16 kHz mono WAV, runs pass one, loads/merges/writes glossary.tsv, runs pass two with hotwords, merges passes, translates in 20-id chunks with exact-id validation, fits cues, writes segments.json/cues.json, writes the SRT with the probe offset applied at write time only, then writes qa.json.
  7. main prints one stage line per callback and wrote <srt>; exit 0 success, 1 pipeline refusal, 2 unusable job or endpoint settings.

Fix decisions

  • Resolved-path equality decides whether the snapshot would clobber its source; relative paths and symlinks are covered.
  • overwrite is a CLI switch, not durable job state. The JobConfig field remains for programmatic callers, and a missing field defaults to False, so the slimmer snapshot stays loadable.
  • The library keeps its Python-API wording; the CLI translates the error at the boundary where a shell flag exists.
  • Snapshot and artifact writes stay atomic; skip-on-equal is the only new branch.

Assumptions and invariants

  • job_dir/job.json is the canonical snapshot; a source that resolves to it is the same job, not a second description.
  • SrtExistsError always carries .path.
  • JobLock serialises runs in a job directory, so the snapshot decision is not raced by another writer.
  • The offset stays out of cues.json and is applied only in the written SRT.
  • A nominated term must occur literally in pass one; an entry is a stem and the profiles decide inflection and honorifics.
  • The headless chain emits an SRT and working artifacts, not the ASS lane that lane 06 ultimately requires; worker resume and cancel remain later work.

Changed files

  • src/subsmith/cli.py: console entry point, job validation, endpoint wiring, exit codes, source path for the snapshot guard, CLI wording for the existing-SRT error.
  • src/subsmith/pipeline/run.py: stage chain and lock owner; guarded snapshot, overwrite removed from payload, source_path forwarded.
  • src/subsmith/pipeline/transcribe.py: device resolution, millisecond word times, hotwords, pass labels; widens a segment when a word lies outside its reported span.
  • src/subsmith/pipeline/glossary.py: entries, literal/NFC/capped merge gate, BOM-prefixed escaped TSV; endpoint nomination replaces regex candidates; GL3.7 to GL3.10.
  • src/subsmith/pipeline/openai_client.py: chat boundary, one call per chunk, one nomination per job; shared client.
  • src/subsmith/pipeline/output.py: atomic JSON artifacts and QA measured from finished cues and words.
  • src/subsmith/paths.py: app-data roots, model cache, job ids/stems, path expansion, job lock; appauthor=False; WK7.9 and PK9.8.
  • src/subsmith/pipeline/protocols.py: seams plus request and unit shapes; TermNominator and pass constants.
  • tests/pipeline/test_e2e.py: slow CPU proof with real ffmpeg and the tiny model; local fixture, offline weights, strict SRT parse.
  • tests/pipeline/test_cli.py and test_run.py: the four new tests for the snapshot guard and the CLI error wording.
  • .github/workflows/check.yml, pyproject.toml: espeak-ng, model provisioning, slow CI step, av<19, console script, -m 'not slow'.

Assumptions and risks

Pass 1 read the risk-first set completely: CI, dependency manifest, entry point, orchestration, persistence and external boundaries, with the remaining test modules and non-changed spec lanes listed as not examined in full. Pass 2 reviewed the fix diff and its interactions and did not hit the budget.

The snapshot collision is resolved. The remaining limit is verification: make check excludes the slow end-to-end test, so this review does not prove the real-model path on CPU; CI does. The broader PR still leaves worker resume and cancel, and the ASS output lane, for later work.

Recommended human review order

  1. src/subsmith/pipeline/run.py:147-316 and src/subsmith/cli.py:138-189: the snapshot guard, the source_path plumbing and the SrtExistsError mapping.
  2. tests/pipeline/test_cli.py:223-280 and test_run.py:135-144: the four tests that protect the two fixes.
  3. src/subsmith/cli.py entry point and error mapping: job path resolution, endpoint defaults, exit codes.
  4. src/subsmith/pipeline/run.py: the full chain, lock scope, glossary timing, artifact order, pass merging and QA inputs.
  5. src/subsmith/pipeline/glossary.py and transcribe.py: model output into shared files, segment widening and hotword handoff.
  6. src/subsmith/pipeline/output.py and openai_client.py: QA evidence and the network boundary.
  7. tests/pipeline/test_e2e.py: the slow path CI runs but the local gate does not.

The snapshot wrote job.to_dict(), including the CLI --overwrite switch, and
overwrote the job file when the source lived inside the job directory. A later
run then replaced the SRT and its backup without the flag.

- Write the snapshot without the CLI-only overwrite field.
- Skip the snapshot when it resolves to the CLI's source job file.
- Translate SrtExistsError at the CLI boundary to "pass --overwrite".
- Test the second run, the snapshot payload, and a source job inside job_dir.
@anthonyma94
anthonyma94 merged commit 7ad9da5 into master Dec 5, 2026
1 check passed
@anthonyma94
anthonyma94 deleted the card/pipeline-e2e branch December 5, 2026 21:23
@anthony-hermes
anthony-hermes Bot requested a review from anthonyma94 December 5, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant