Skip to content

refactor: consolidate the production workflow runtime - #40

Merged
tim8es merged 43 commits into
mainfrom
refactor/workflow-consolidation
Sep 15, 2026
Merged

tim8es merged 43 commits into
mainfrom
refactor/workflow-consolidation

Conversation

@tim8es

@tim8es tim8es commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Goal

Consolidate Book Translator around one supported production workflow. Remove legacy migration/runtime compatibility and development-era Workflow v2 design artifacts while preserving the current claims/review/finalize/storage behavior and making integrity gates explicit.

Intended result

  • one current durable schema/runtime contract;
  • no workflow migration journal/runtime or lifecycle-only review mode;
  • explicit source identity and sealed-corpus hash verification;
  • machine Translator acceptance required before review/build;
  • machine PASS review evidence required for final output;
  • recoverable source-corpus loss can be restored from the exact trusted source without weakening hash-tamper checks;
  • GitHub and filesystem backends retain consistent missing-artifact semantics;
  • canonical architecture documented in docs/ARCHITECTURE.md;
  • historical PR ci: verify workflow v2 proposal RED/GREEN #36 is not touched.

Older workspace shapes are intentionally not resumed through a parallel legacy production runtime; they must be converted outside the current runtime before use.

Verification

Exact PR head: d78c35db0559dff1dd2f072e6d9f1385d715fef2

GitHub Actions run: 34977341347

  • Python 3.10 job 104408329686: 292 tests, OK
  • Python 3.12 job 104408330103: 292 tests, OK
  • test_resume_review_finalize_report_and_epub_build_end_to_end: OK on both matrices
  • corpus restore with preserved translation acceptance: OK
  • preserved-source and extracted-artifact tamper gates: OK
  • missing/invalid translation acceptance build/review gates: OK
  • GitHub missing-translation status/resume behavior: OK
  • all inline review threads addressed and resolved
  • Node 24 actions (checkout@v5, setup-python@v6) used; no Node 20 deprecation warning

Base main before merge: dca1e7db6974d5c4354e4850ecf82b42cda06f42.

No deploy is part of this PR. Historical PR #36 remains intentionally unmerged.

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

Copy link
Copy Markdown

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: 3e8662f66b

ℹ️ 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".

Comment thread tests/test_architecture_consolidation.py
Comment thread docs/ARCHITECTURE.md

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

Copy link
Copy Markdown

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: 38401ae8fe

ℹ️ 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".

Comment thread tests/test_architecture_consolidation.py

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

Copy link
Copy Markdown

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: 4b4ffac0d8

ℹ️ 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".

Comment thread docs/ARCHITECTURE.md
Comment thread scripts/workflow_v2/repository.py

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

Copy link
Copy Markdown

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: c6759514af

ℹ️ 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".

Comment thread scripts/workflow_v2/source_schema.py Outdated

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

Copy link
Copy Markdown

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: 072e38aac4

ℹ️ 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".

Comment thread scripts/workflow_v2/status.py
Comment thread scripts/workflow_v2/source_cli.py
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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

Copy link
Copy Markdown

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: d78c35db05

ℹ️ 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".

Comment on lines +397 to +400
build.set_defaults(
func=_adapt_errors(
lambda args: source_build_command(args, root, original_build),
error_factory,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Apply the current-workspace gate to EPUB builds

When a chapter is marked translated and has a nonempty artifact but lacks translation_acceptance, book.py build <slug> --format epub --allow-unreviewed still succeeds and writes an EPUB. These lines install the new workspace gate, but register_epub_commands() subsequently routes EPUB requests directly to epub_build_command(), whose preflight never calls translation_acceptance_errors(). Fresh evidence relative to the previous acceptance-gate comment is that Markdown builds now reject this state while the EPUB path still bypasses the gate; apply the same admission check to EPUB builds.

AGENTS.md reference: AGENTS.md:L48-L50

Useful? React with 👍 / 👎.

Comment on lines +122 to +123
for resolution in review_manager.resolve_all(progress, metadata):
review_states_by_number[resolution.chapter_number] = resolution.state

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject missing translation acceptance before reviewer dispatch

For a current-schema chapter whose lifecycle is translated but whose translation_acceptance is absent, this resolution records the artifact as merely missing review evidence and leaves status valid, so resume dispatches a Reviewer. The newly added _require_current_translation_acceptance() then rejects review-record, making the recommended operation impossible to complete. Treat this state as invalid or route it back through Translator acceptance before scheduling review.

AGENTS.md reference: AGENTS.md:L48-L50

Useful? React with 👍 / 👎.

@tim8es
tim8es merged commit c750067 into main Sep 15, 2026
2 checks passed
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