Skip to content

feat: add zyraXSuno ontology-driven Suno orchestration - #46

Open
sonoxo wants to merge 16 commits into
mainfrom
feature/zyraxsuno-ontology
Open

feat: add zyraXSuno ontology-driven Suno orchestration#46
sonoxo wants to merge 16 commits into
mainfrom
feature/zyraxsuno-ontology

Conversation

@sonoxo

@sonoxo sonoxo commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Adds the first zyraXSuno implementation inside the Zyra monorepo as an incubation app.

Includes:

  • ontology graph for artists, songs, themes, constraints, jobs, checkpoints, and exports
  • 3000-character hard-limit validation
  • fresh-title and fresh-theme enforcement
  • diss-first and punchline validation
  • batch planner with checkpoint/resume state
  • pluggable generation provider interface
  • Suno-ready JSONL export
  • HTTP service and CLI
  • 100-song batch example for /va3lm-gpt-doug-llm
  • CI typecheck/tests

This branch is structured so it can be split into a standalone zyraXSuno repository later without changing the domain model.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c856e01d91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

registerSong(batch: BatchSpec, song: SongDraft) {
const validation = this.validateSong(batch, song);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate registrations against stored batch constraints

When /songs/register receives a batch ID that already exists, the caller can submit a different BatchSpec with dissFirst, freshness checks, or character limits disabled; this line validates against that untrusted payload and then links the song to the existing strict batch. Resolve the registered batch and its constraint node by ID for validation, and reject missing or conflicting specifications.

Useful? React with 👍 / 👎.

Comment thread apps/zyraXSuno/src/ontology.ts Outdated
}

registerBatch(spec: BatchSpec) {
const artist = this.addNode("Artist", spec.artist, { name: spec.artist }, `artist:${norm(spec.artist)}`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reuse canonical nodes when registering another batch

After the singleton HTTP ontology registers its first batch, registering any distinct batch for the same artist throws Ontology node already exists because this deterministic artist ID is always passed to addNode; the flow node has the same problem. This prevents normal multi-batch operation and also makes same-process checkpoint resumption fail before planning, so existing canonical artist/flow nodes need to be reused rather than re-added.

Useful? React with 👍 / 👎.


for (const job of jobs) {
const song = await this.provider.generate(job);
const validation = this.ontology.validateSong(spec, song);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Carry checkpoint novelty history into resumed validation

When resuming with a fresh ontology instance, previous.usedTitles and previous.usedThemes are used only to filter planner seeds; generated songs are validated solely against spec and the empty ontology. A provider can therefore return a title or theme accepted before the checkpoint and have it accepted again, violating the core freshness guarantee. Merge checkpoint history into the validation state before processing resumed jobs.

Useful? React with 👍 / 👎.

Comment thread apps/zyraXSuno/src/cli.ts
const { mkdir, writeFile } = await import("node:fs/promises");
const { dirname } = await import("node:path");
await mkdir(dirname(outputPath), { recursive: true });
await writeFile(outputPath, jobs.map((job) => JSON.stringify(job)).join("\n") + "\n", "utf8");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Export actual Suno records from the CLI

Every documented CLI export invocation writes raw GenerationJob objects, which contain planner fields such as prompt, titleSeed, and themeSeed but no generated title, style, or lyrics. This does not match the newly defined SunoExportRecord format and cannot serve as the advertised Suno-ready JSONL; the command should export generated song records through the exporter or be named and documented as a job-plan export.

Useful? React with 👍 / 👎.

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