Skip to content

Classroom migration investigation

Status: investigation opened 2026-11-16; Q1-Q14 and shared understanding confirmed the same day. First publishing slice implemented and full validation passed. Local activation and classroom trials remain outstanding.

Anton wants to investigate running his real teaching and English Corner presentation work from Emergent on his local Incus-based Kubernetes environment. For the pilot, Codex in the existing teaching directory continues creating local flat files and also uploads to the local Emergent instance. Both the existing local Podium and native Emergent Podium must remain usable. Moving authoring entirely into Emergent is later work, not a prerequisite for this pilot.

The hosted-agent addition, 12739ad8, supplies execution and persistence machinery. Native Emergent Podium, teaching records and migration tools already existed before that addition. Moving bytes to object storage alone does not complete either workflow.

Anton confirmed Q1-Q6 with the following clarification:

  • Use native Emergent Podium as the cluster presentation path.
  • Keep Codex authoring in /home/anton/teaching/yxnu, producing the local flat files and uploading corresponding material to the local Emergent instance. Either presentation path remains available.
  • Start with presentation consumption and classroom use. Broader teacher-specific functionality can move toward offline-first later; it does not expand this pilot.
  • Validate with one future regular teaching Meeting and one English Corner event before broad migration. Actual pilot selections remain open.
  • Establish workstation Operations MCP/API access first. A hosted in-cluster agent is not a dependency of the first migrated class.
  • Later preparation uses a separate revision while preserving exactly what was delivered for past Meetings, including Deck, Plan and media references.
  • Offline-first consumption inside Emergent is a firm target, including reopening after browser restart and switching among previously prepared Meetings. Keeping local files is an additional fallback, not a substitute for this behavior.

Ordering clarification from Anton: offline consumption does not have to be finished before presenting to real audiences. Start with connected classroom trials to validate the useful presentation path; complete and verify offline consumption as a separate milestone afterward. An offline gap must not silently become a gate on the first live trial.

The temporary local-authoring/upload workflow extends the earlier one-shot migration assumption in ADR-0066 for this pilot. Native Deck/Slide storage is retained; repeatable publication from local sources still needs a defined interface. This is not yet a decision to introduce bidirectional editing or synchronization.

Existing documentation and agent interfaces

Section titled “Existing documentation and agent interfaces”
Resource What it covers
ADR-0070 Personal hosted-agent pilot, DSH first, durable sessions, installations and Marking Bundles.
Agent runtime design record Earlier interview decisions, harness/provider investigation and integration evidence.
Hosted-agent runbook Image builds, configuration, pilot audience, checkpoint recovery and first marking trial.
Runtime README Worker HTTP API, files, installations, checkpoints, exports and smoke commands.
ADR-0065 Shared Operations catalogue and person-bound HTTP/MCP access.
ADR-0066 Native Deck/Slide authoring, Marp conventions, Podium and offline presentation. Its architecture status is explicitly provisional.
First teaching-class import Roster/bootstrap preparation, explicit ID mappings, selected Deck/Plan import, Prepare and Podium.
Teaching absorption build plan Existing implementation history and outstanding real-import/browser trial work. October corpus counts are historical.
Domain vocabulary Offering, Meeting, Meeting Plan, Deck, Slide, Content, Operation, Agent Session and Marking Bundle.
YXNU Podium reference Current classroom behavior, local media conventions, rehearsal, presentation state and audience review.

The older teaching absorption handover still describes C3/C4 as future work. The implementation and newer build-plan entries supersede that part of its inventory. The bootstrap runbook’s 10 October example is historical; it must not be treated as a newly selected live pilot.

No Emergent teaching, Podium or migration SKILL.md was added in 12739ad8. Repo-authored skills currently concern Mantine development. The hosted runtime’s generated DSH profile contains general teaching/marking instructions, and its workspace includes the Marking Bundle example and renderer helper.

The installed DSH 0.2.2-rc.1 dependency supplies four upstream skills: agent-experience, cordis-composition-reference, cordis-plugin-development, and editing-cordis-compositions. They concern harness/composition development, not the day-to-day Emergent teaching workflow. Dependency skills listed by TanStack Intent are development references; discovering them does not establish that a classroom agent has workflow-specific instructions.

YXNU has a publisher-page transcription skill, but no Podium/migration skill was found. A useful future teaching skill would need the agreed source-of-truth policy, read and write interfaces, media intake, future-versus-delivered revision rules, audience review, Prepare and the actual classroom launch sequence. Its scope depends on the decisions below.

The hosted runtime connects DSH to the existing tools-only Streamable HTTP Operations MCP endpoint, /mcp; it did not introduce a new teaching MCP server. The MCP catalogue and HTTP POST /operations/:name share typed contracts and permission checks. There are no MCP resources or prompts in this adapter.

Relevant tools already include decks.create/update/delete, slides.insert/update/delete/reorder, meetingPlan.replace, Meeting lifecycle, calendar/room/pattern authoring, Rota publication and Survey shortlist replacement. See the catalogue and Deck contracts.

These authoring tools do not supply a general deck/Offering/materials read and discovery interface. Application reads use the sync rail. A standalone agent needs a deliberate read path or supplied mappings/context before it can reliably inspect and edit existing teaching content. No live-Podium navigation Operation was found.

Workstation agents can use the same person-bound Operations endpoint. Token lifecycle routes and a bootstrap mint CLI exist, but the repository’s MCP configuration only configures Mantine; it does not establish a working workstation Emergent connection.

Agent Session files/messages/lifecycle are a separate HTTP interface. Session checkpoint objects are not automatically teaching Content or Decks.

Area YXNU today Emergent implementation
Authoring input Markdown, YAML, JSON and generators; some rendered deck Markdown is generated output. Deck and ordered Slide rows; each Slide preserves verbatim Markdown plus typed cues, layout and bindings.
Plan Filesystem YAML run sheet with segments, rules and steps. Meeting Plan and Segments, with explicit Checkpoints and derived reflow.
Projector Bun localhost server, React/Mantine cockpit and same-origin Audience window. Teacher-portal Presenter and same-origin Audience window.
Controls Cues, current/next slide, media remote, clock, manual timing marks, rehearsal and saved layout. Cues, paging, audio/video/image support, clock/reflow, deliberate Checkpoints and resizable panes; exact current YXNU parity still needs a trial.
Participants Separate generated HTML picker using roster CSV and local browser state. Integrated picker, Group/Rota data, Attendance and Observations.
Offline Local kit files; startup rejects remote media URLs. Prepare captures required reads and actual media bytes into IndexedDB after checking the offline app shell; reload reconstructs local Blob URLs.
Persistence Private Git sources, local/generated media and browser localStorage. Teaching data in Postgres/sync; media through Content/Content Binding and Supabase Storage; prepared classroom copy in the browser.

Implementation references: Presenter, Prepare, media authoring, Supabase object adapter.

The checked-in development storage configuration points Supabase Storage at common-storage.infra.svc:3900, region garage, backing bucket app-storage-emergent. Thus direct S3 and Supabase Storage can be different interfaces over the same underlying cluster object store. Product media currently has a 200 MiB per-object limit, below the configured 500 MiB Storage limit.

Supabase maintains object metadata separately from underlying S3 bytes. Its documented Storage schema requires object changes through the Storage API. Uploading loose bytes directly into a backing bucket does not replace Emergent’s Import/Content/Binding intake. See also the official self-hosted S3 guide.

Hosted Agent Sessions use direct S3 under agent-sessions/<person>/<session>/ for workspace recovery. That storage is useful for migration scripts and intermediate artifacts; retaining a file there does not publish it to Podium.

The corpus CLI has a database-free dry run, explicit source/run-sheet selection, theme handling and Offering/Meeting/media mappings. Its apply path is a direct-database maintenance import, not an MCP/Operations call. It is a one-shot migration tool: it refuses an already imported Deck or authored Plan. Media must already have been uploaded and bound; the importer does not manufacture Content. Default corpus discovery covers courses/**/*.md; English Corner requires explicit source selection/additional sources and mappings.

The authenticated YXNU setup flow already combines real media upload, Content placement through the sync write door, decks.create and meetingPlan.replace. It is closer to the pilot’s desired path, but its receipts reuse media by path and reuse an existing Deck without detecting changed Markdown. On rerun it replaces the Plan. Neither path currently implements repeatable content-aware publication.

Media upload currently uses the session-authenticated workflow API, not MCP Operations token authentication. Workstation publication therefore needs the existing authenticated upload/placement path or an explicitly added capability; connecting Operations MCP alone does not cover every step.

Creating a fresh Deck without changing the previous one is supported. The final meetingPlan.replace selects its Deck, rules and Segments in one transaction, so assets and a new Deck can be staged before selecting them. However, that replacement overwrites the Plan and deletes/recreates Segments: it does not retain previous Plan revisions. There is no publication fingerprint, expected-revision conflict check or end-to-end publication identity in these paths. Delivered-version preservation remains necessary.

The source YXNU Podium is not portable simply by substituting bucket URLs. It resolves course directories, invokes Marp on local paths, discovers local CSS and serves kit media from disk. A separate option would materialize a complete versioned kit from object storage and retain that presenter. This would be a new integration, whereas the existing Emergent direction adopts native Podium and structured teaching data.

Some source presentations have upstream JSON, plans, images and generators. For example, English Corner Quiz Night generates its deck and handouts from structured inputs; an Oral week-13 run sheet references generated output Markdown. Importing a deck preserves the presentation, but does not by itself migrate the upstream authoring workflow. Source provenance and any still-needed generators must remain available.

English Corner includes drop-ins and nonstudents, without ordinary course grading or a fixed roster. An Emergent Offering/Meeting can organize its presentation, but that must not silently turn into a requirement for every attendee to have an account or ordinary learner Membership. Participant selection/recording behavior needs an explicit choice if it is included in the pilot. The current Podium picker selects Offering/Group learners; it has no ad hoc name/seat-number pool. Slides and timings can run without using that picker.

Delivered-version preservation needs attention before reusing and editing shared Decks. Current Deck/Slide Operations mutate an existing Deck and rerender it for attached Meetings; no delivered-version freeze was found in that path. Preparing a browser snapshot does not establish an immutable historical version for every Meeting. A future revision must not alter previously delivered sources or exports. The required behavior is already Anton’s standing rule; its implementation here remains a design question.

Source inspection found a production service-worker shell, local pgwasm reads and per-Meeting prepared media. These are useful foundations, but not a complete guarantee of offline reopening. Background auth refresh failure can mark the teacher signed out; initial local database attachment also requests a token. The stored preparation snapshot is not currently used as a standalone presenter recovery source if local synced rows are unavailable. Prepared-Meeting navigation still depends on those rows.

Preparation follows current locally synced data. New media identities can require preparing again; there is no explicit choice to continue with the last prepared edition. Browser storage persistence/quota handling also needs later investigation. These are later-milestone findings, not reasons to delay the connected audience trial.

Sources: auth provider, teacher sync, preparation hook, presentation data.

This investigation read sources and documentation. It did not build, upload, import, modify teaching material, apply migrations, run tests or run validation.

The hosted-agent runbook records real SDK/tool/resume/delegation checks against a local scripted provider, packaged image checks and real Garage checkpoint recovery. Those are implementation evidence, not live provider/OCR/classroom acceptance. The recorded DSH smoke evidence refers to the older rc.4 package; installed DSH is now 0.2.2-rc.1.

Agent sessions remain disabled in chart defaults, with no committed development override found. This does not establish live-cluster state. A read-only Kubernetes probe from this session resolved context default but attempted localhost:8080 and received connection refused; it did not verify the actual Incus cluster. Earlier plans’ unapplied-migration/import notes are historical and need current verification.

Anton accepted all Q7-Q12 recommendations on 2026-11-16:

  • Q7: local files are the authoring source for this pilot. Detect changes made directly in Emergent since publication and stop for explicit reconciliation; never silently overwrite those differences.
  • Q8: a changed publication creates a retained complete edition containing the Deck, Plan and media references. An identical publication is a no-op. Select the new edition only after its required material has staged successfully, leaving the previous edition usable if staging fails.
  • Q9: publication is an explicit command Codex runs when requested, not an effect of every local build. Local preparation remains usable without the cluster.
  • Q10: earlier editions initially need complete inspectable retained files and metadata; a convenient browse/restore UI is later work.
  • Q11: the first English Corner trial uses slides, timings, media and presentation controls. Ad hoc picker support is deferred; no attendee accounts or roster import are prerequisites for that presentation trial.
  • Q12: the first trial prioritizes correct content, cues, media and presentation controls with readable rendering. Inspect the actual Emergent output; exact local theme/layout matching is not a prerequisite.

The implementation sequence implied by those choices is:

  1. Establish the workstation’s authenticated local Emergent read/publish path, reusing the existing Operations, media intake and Content placement rather than raw S3 writes.
  2. Provide explicit repeatable publication with stable source/Meeting mapping, changed content detection, retained complete editions, conflict detection and final selection.
  3. Document that command and expose a teaching-directory skill so the other Codex session can continue its existing file preparation and invoke publication when asked.
  4. Publish and inspect the selected future regular Meeting and English Corner material, keeping their local versions available, then validate with actual audiences.
  5. Complete and verify offline-first consumption as its own subsequent milestone.

Anton confirmed this delivery sequence and instructed implementation. Applying migrations remains his step under the migration runbook. Existing source preparation and delivery approval remain with the teaching session.

  • Regular: Oral 26-3, Week 13 Education/Lifestyle. The current 13/11 planning correction places it on 18/11/2026, 14:00-15:40, room 2-102. Its existing dated presentation has 32 Slides and four MP3 files, about 4.5 MiB. The dated snapshot is the equivalence reference; retain the shared authored source as provenance. Resolve the shared CSS symlink into retained bytes. Homework notices on Slides 23-24 still require the teaching session’s content/date approval and scheduling before live use.
  • English Corner: the existing Quiz Night pack, with generated Markdown, one local SVG and inline CSS, no declared audio/video cues. It supplies a small image/cue presentation sample. Event timing remains unconfirmed: the English Corner records still condition 18/11 on an outdated Sports Week assumption, with 25/11 as fallback. Choosing the source pack does not confirm an event date.

The declared assets are present on disk; this was not a new playback test or delivery clearance. Neither pack was rebuilt or changed. Selection of actual live trials remains open; a migration target must not impose a teaching deadline or override preparation approval in the teaching directory.

Source retention, agent read/discovery design, import/revision mechanics and rendered review need to follow the agreed publication behavior. PDF/handout migration and broader offline teacher authoring remain later work unless explicitly brought into scope.

Implemented the agreed first slice:

  • podium.listOfferings, podium.listMeetings, podium.inspect and podium.publish join the existing authenticated HTTP/MCP catalogue.
  • The workstation command prepares selected local files, discovers targets and explicitly publishes through supported media and Operations APIs, with private receipts for staged effects and publication replay.
  • The server retains complete source/Deck/Plan editions and immutable media identities. Publication selects the new Deck and Plan atomically. Generic authoring commands also preserve past, started or checkpointed Meeting material.
  • Additive migrations are 20261116082904_podium_publications and 20261116083019_client_role_acl. No committed migration folder was rewritten; migration drift checks pass.
  • The publishing runbook and publish-podium skill are available. Skill links were installed in both checkouts; the teaching link changes no material.
  • Corrected only the incompatible Drizzle Kit commit-build pin to the published 1.0.0-rc.5. The ORM remains 1.0.0-rc.5; no broad dependency refresh was applied.

Focused checks passed: eight real-pgwasm publication cases, sixteen client/preparation cases, fifteen existing Deck/Meeting operation cases, and thirty migration drift checks. An independent skill trial prepared the real Oral pack from the teaching-session command. Both real packs also rendered through the actual Emergent Deck renderer: 32 Slides for Oral and 45 for Quiz Night, with their cues and media descriptors. These checks do not establish browser playback, live publication, delivery clearance or classroom acceptance.

Final mise exec -- bun run validate:full passed. Coverage results include 2,475 API tests, 1,529 DB tests, 810 domain tests and 340 offline-data tests (one skipped), plus the existing frontend and other package suites and the 29 language-enrichment cases. Fixed-date authoring tests use a controlled pre-delivery clock so the new preservation guard is exercised in the intended context. New domain fingerprint tests cover stable JSON ordering and identity changes from source, cue and Plan revisions.

The initial concurrent API/DB coverage run timed out two existing survey-policy cases. They passed in isolation; the DB and API coverage packages were then run sequentially through the normal scripts, and the final full gate reused those exact successful results. Timeout and concurrency settings were not changed. This does not resolve cold-cache worker contention for future concurrent runs.

Migrations have not been applied to the maintainer’s database, and neither source pack has been uploaded or selected in the live instance. The publishing runbook records the maintainer’s migration step, API reload and development teacher-server commands. Connected audience trials and subsequent offline consumption remain the next milestones.