Skip to content

[Epic] Embeddable engine: stable contracts for front-ends, orchestrators and CI dashboards that drive ForgeLM #1027

Closed as not planned

Description

@cemililik

Closed as not planned (2026-10-20). The six sub-issues were triaged into the existing wave epics, so this epic is no longer needed; the closing comment says where each one went. The principles and the stage order below remain the design background those issues cite.

Epic · Embeddable engine · 6 sub-issues (EMB-01 … EMB-06)

Scope

ForgeLM is a headless, config-driven engine: a GUI or web application is out of scope for this repository (product strategy, "What ForgeLM Is NOT"). A separate program can still drive it — a desktop or web front-end, a pipeline dashboard, a chat-ops bot — and on 2026-10-20 the project owner decided that any such front-end will be a new application built on top of ForgeLM, not a feature added to it.

That only works if the engine offers contracts a program can rely on without scraping human-readable output. A review of development at 2059b59 against that use case found six gaps. Each has its own issue with the evidence, the proposed design, the alternatives that were rejected and acceptance criteria.

ID Gap Issue Size
EMB-01 A run cannot be observed: there is no stable stream of step, epoch, loss, ETA and phase. #1028 L
EMB-02 A run cannot be stopped cleanly, least of all on Windows, where terminate() is a hard kill. #1029 M
EMB-03 On Windows the audit log and the approval gate have no cross-process lock; concurrent writers fork the hash chain. #1030 M
EMB-04 The quantized GGUF that users actually run cannot be safety-evaluated; safety-eval refuses it. #1031 L
EMB-05 Apple Silicon training is unmeasured: PyTorch-MPS or MLX? A spike and a decision record. #1032 M
EMB-06 The contracts that already exist (exit codes, JSON envelope, audit log) are not documented for a calling program. #1033 S

Principles every sub-issue follows

  1. The engine never depends on a front-end. A need raised by a front-end enters ForgeLM only as a general library, CLI or config feature with tests and documentation. There is no UI code, UI-specific flag or UI-only behaviour in this repository.
  2. Additive by default. New CLI flags, config fields, JSON keys and events are MINOR changes (release.md). Exit codes 0–6, the --output-format json envelope and the meaning of existing audit events do not change.
  3. New code goes in new small modules. forgelm/trainer.py and forgelm/compliance.py are over the module-size ceiling with no-growth budgets (their splits are Split forgelm/trainer.py into a sub-package (_kwargs, _runtime, _finalize, _artifacts) — deferred until Phase 16 S4 and S8 have landed #904 and Split forgelm/compliance.py into a sub-package (_audit_log, _annex_iv, _provenance, _gdpr) — deferred until Phase 16 S9 has landed #906); the new behaviour lives in new modules and the existing files gain only the lines that attach it.
  4. Config-driven and opt-in. Behaviour is chosen by validated YAML fields with unchanged defaults; no environment-variable sniffing for behaviour.
  5. Proved on all three desktop platforms. Each contract is tested on Linux, macOS and Windows. Today Windows and macOS tests run only when a release tag is pushed (Tests run on Windows and macOS only when a release tag is pushed #962); that job is a dependency of EMB-03.
  6. Documented in English and Turkish in the same pull request, with the CI guards the project already has.

When: stages and the reason for the order

Sequencing is driven by which files Phase 16 steps still own (trainer.py: S4, S8; compliance.py: S8, S9 — S2 and S3 have landed) and by decision "behaviour before contracts before docs".

Stage Work Why here
A — now, alongside Phase 16 EMB-03 (new forgelm/_filelock.py; a two-line import swap in compliance.py and in cli/subcommands/_approve.py), the first draft of EMB-06, and the measurement spikes of EMB-04 and EMB-05 (no repository change). A new module with near-zero edits in files that steps own. Coordinate the compliance.py swap with S9 (#895).
B — after S8 (#894) has settled trainer.py EMB-01, then EMB-02. trainer.py is at its no-growth budget and S8 changes the same region. Land the stdout fix (#412) first or together, so the progress tests can assert a clean stdout. EMB-02 reuses EMB-01's callback.
C — after S5 (#891) EMB-04 implementation. S5 redefines verification outcomes ("three states, not a success bit"); GGUF evaluation must report in that vocabulary.
D — after the EMB-05 decision Backend implementation issues, opened by the decision record. #541 and #488 must land first; the spike decides whether a second training backend is worth its maintenance.

Recommendation for a first front-end (MVP): EMB-01 (Experimental tier) + EMB-03 + EMB-06 are the minimum; EMB-02 is strongly advised because a front-end needs a Stop button. EMB-04 and EMB-05 widen trust and platform reach but do not block an MVP.

How to work on it

Claim one sub-issue at a time (see CONTRIBUTING, Finding Work). Each sub-issue states its own acceptance criteria and open design decisions; the decisions are recorded as dated rows in docs/roadmap/risks-and-decisions.md before the code lands.

Done when

  • Every sub-issue is closed (done, or closed with a reason).
  • docs/guides/embedding.md (and its Turkish mirror) describes only contracts that exist and are tested.

Raised on 2026-10-20 from an architecture decision (ForgeLM stays a headless engine; front-ends are separate programs built on it). Code links point at 2059b59 on development; line numbers may have moved. Tracking IDs EMB-01 … EMB-06 are stable references for commits and pull requests.

Activity

  1. added
    epicParent issue grouping one roadmap theme; progress = its sub-issues
    on Oct 20, 2026
  2. cemililik commented on Oct 20, 2026

    @cemililik
    CollaboratorAuthor

    Closing as not planned: each sub-issue now sits in the existing epic for its wave, so a separate epic would only add a level of nesting.

    Issue Severity Wave Epic
    #1028 EMB-01 progress events Low 4 #875 Wave 4 · Module sweep
    #1029 EMB-02 cooperative stop Low 4 #875 Wave 4 · Module sweep
    #1030 EMB-03 Windows cross-process lock Medium 3 #871 Wave 3 · Security contract
    #1031 EMB-04 safety-eval for GGUF Low 4 #875 Wave 4 · Module sweep
    #1032 EMB-05 Apple Silicon spike Info 4 #877 Wave 4 · Technology
    #1033 EMB-06 embedding guide Low 4 #874 Wave 4 · Docs

    The ordering constraints are kept as "blocked by" links: #1028 waits for #894 (Phase 16 S8), #1029 for #1028 and #894, #1031 for #891 (S5). The interrupted-run defect EMB-02 builds on (CR-A02-046) keeps its Medium severity in #569.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicParent issue grouping one roadmap theme; progress = its sub-issues

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions