# Controlled native acceptance contract Recorded before the first live run of the controlled workflow. This is a development acceptance protocol, not a testimonial or a production-readiness claim. Synthetic integration tests are reported separately from native runs. ## What changed The unattended Codex path runs the existing skill through a deterministic controller. Each native process is a scoped read-only role in a fresh empty directory. The official CLI still owns authentication and subscription limits. The skill manifest, creative references, reader packets, comparison rules, calibrated rubric and exporter remain the shared core. The controller owns phase transitions, native attempt reservations, revision pass reservations, original call evidence, canonical chapter publication and final export checks. Writers and reviewers cannot edit these records. Native response text is preserved; visible progress reports real roles, elapsed time, saved chapters and measured counts, never fabricated model thoughts. The guided native-agent path and existing projects remain available. An existing project is not silently migrated or upgraded. The original protocol below tests Codex. The added [Claude subscription transport](native-claude-transport.md) uses the same controller and needs a separate frozen native acceptance run. Neither host inherits the other host's test result. Controlled roles capability-check `codex exec --help`, then use its documented `--ignore-user-config` and `--ephemeral` options. The explicit model, effort, read-only sandbox and approval setting are still supplied; execpolicy rules are retained. Authentication stays with the official CLI. The program does not edit global configuration or install another CLI. See the official [non-interactive guide](https://learn.chatgpt.com/docs/non-interactive-mode) and [command reference](https://learn.chatgpt.com/docs/developer-commands#codex-exec). The first live controlled run was stopped by QA after a plan repair leaked its history and self-approval into the next verifier packet. It delivered no chapter. The corrected planner returns declarative story fields; the program renders the brief, outline and ledger from those same fields and rejects process assertions. Repair calls retain the same neutral output contract. Their error feedback is kept outside story data. Frozen reader and comparison packets never receive producer-retry feedback. A full integration test now exercises plan rejection, repair, a fresh neutral verification and a later interrupted chapter promotion. The second live run passed independent planning and the opening reader panel, but stopped at chapter 2: its two returned chapters were 4,524 and 4,347 words against an unnecessarily rigid 3,288–4,014 allowance. Its accepted opening was 3,836 words. No export was produced. The next build reserves minimum/maximum capacity for the remaining chapters, supplies a central writing target, and allows different chapter lengths while keeping the original whole-book range. A producer retry receives its original rejected draft plus deterministic errors; the raw response must still match its native receipt. Blind reviewers never receive an earlier response. The two-attempt budget is unchanged. Status now distinguishes an expected pending export from a failed check and uses the controlled workflow's final reader index when present. Neither change converts a pending book or a failed literary gate into a delivered/approved one. The third run wrote all 12 chapters (46,000 words before revision). Its first calibrated weighted assessment was 7.036/10, with a 5.0 coherence floor. Two revisions were promoted and two rejected. It then stopped while staging the chapter 5 proposal: JSON validation had accepted XML-invalid control characters, so the bounded repair handler was never reached. No complete export was made. The original run, negative reviews, accepted chapters and malformed response remain preserved. This is a failed unattended acceptance, not a successful book. The next build validates Unicode before accepting producer responses. Invalid optional revision proposals use the same two-attempt budget; if both remain invalid, it retains the accepted chapter and records the rejection. Authentication, transport, altered evidence and incomplete first drafts still block execution. All writers now receive a neutral stable identity/calendar baseline. Every chapter editor receives the shared revision strategy. Literal factual edits use the existing fresh correctness verifier and atomic publication guard; creative edits first receive a source-bound repair check and then, only if it passes, the four-reader comparison. That check reads the entire current manuscript and author contract, verifies the assigned repair and its consequences, and cannot replace the preference vote or close a whole-book finding. Factual edits run before creative edits. A separate follow-up check carries all historical continuity, audit and proofread findings forward. It can close an allegation only with current manuscript evidence from every affected chapter. A new audit omitting an old finding does not close it. This history is never sent to blind literary graders or reader panels. Required open findings remain gates and must be addressed in the next revision plan. Review coverage schemas list exact assigned sources, excluding reference guides. The optional `--weighted-quality-target 9.0` now also keeps the revision loop open until its calibrated weighted score exceeds 9.0 or its original budget is spent; it does not replace the 8.5 per-dimension floor or expose targets to evaluators. The fourth run stopped before drafting. Its first verifier found a third POV outside the approved two-person contract. A whole-plan repair corrected the POV but shortened unrelated late-chapter events, weakening explicit physical rescue into wording that merely permitted one. The second verifier blocked the plan for missing evacuation refusal and incomplete extraction. That build's single plan-repair allowance was exhausted: zero chapters, no export, no score. The next build maps each indispensable author promise to a setup action and concrete on-page causal resolution for independent plan verification. Writers receive their chapter entry, never a combined multi-chapter payoff. Plan repairs now edit named text fields against their exact original values; unrelated fields, chapter numbering and assigned promise chapters stay unchanged. Three substantive plan repairs are permitted, each followed by a fresh verification. An unchanged plan is never rerated to seek a favorable verdict. This separate architecture budget is fixed before the new trial; prior failed trials and their original budgets remain unchanged. The fifth trial was stopped by QA before drafting: a multi-chapter promise could forward its complete future resolution into an earlier writer packet. That is an observer intervention, not an unattended success. The fix removes the global promise map from writer inputs and requires the plan to state local actions in each chapter entry. A regression uses a future-only sentinel in a multi-chapter promise and verifies that the plan critic sees it while the opening writer does not. The complete proposed plan and stopped process evidence remain preserved. The sixth trial stopped during the first targeted plan repair. Its first native proposal contained nine real field changes plus two unchanged entries; the retry contained six real changes plus one unchanged entry. Requiring every listed entry to change rejected both entire batches. The next validator accepts harmless unchanged entries alongside real changes, but rejects a wholly unchanged plan, duplicate paths, changed originals and unknown fields. It never rewrites the raw native response or rerates an identical plan. Both failed native responses remain preserved, and this run delivered no manuscript or export. The seventh trial exposed another plan-patch mismatch: both model proposals paraphrased a `before` field while proposing repairs. The validator rejected them instead of guessing. In the next protocol the model supplies only an allowed path and its new text. The journal already binds every response to the exact frozen input packet; the controller records original values, base/result hashes and the original response hash itself. Duplicate/unknown paths, changed evidence and wholly unchanged plans remain blocked. No raw model response is repaired. Negative-path probes also exposed a valid unassessed rubric dimension aborting delivery and unchanged revision proposals causing fresh preference/rubric calls. The controller now retains an unassessed score as null, marks the quality gate unmet, and can still export the complete draft after bounded revision. It never invented a zero or passing grade. Identical chapter proposals are retained without another comparison; an unchanged whole manuscript keeps its current measurements instead of being rerated. Revision budgets still advance, and completed pass records point to the actual current measurement across resume. Synthetic tests exercise all three failed quality passes, honest export and no-call resume. ## Fresh live test - Official Codex CLI, exact model `gpt-5.6-luna`, effort `high`. - A new English standalone novel, 12 chapters and 40,000–48,000 prose words. - A new idea, a verified project-local snapshot, original responses retained. - An independent plan verification before any chapter, creative checkpoints during drafting, factual checks at chapters 5, 10 and 12, full adversarial audit, bounded revisions, current reader/rubric evidence, technical proofread, editorial package and source-verified Markdown/EPUB delivery. - No manual editorial rescue, copied chapters, adjusted word contract, replaced reviews, model fallback or injected code upgrade during this run. - At most two native attempts per scoped call and three revision passes. Every attempt/pass is saved before dispatch. Exhaustion is recorded, not reset. ## Required technical evidence All of these are required; averaging cannot hide a failed item: 1. The exact selected model/effort is confirmed in each native header. 2. All eight phases have saved original evidence in order. 3. A failed plan verification prevents drafting. 4. Every planned chapter exists and the fixed word contract is met. 5. Chapter publication preserves the raw response, extracted/staged bytes and accepted backups; revisions pass the existing promotion guard. 6. Original review packets, schemas, responses and source hashes match. A review of earlier prose cannot count as a review of later prose. 7. Revision and retry budgets persist across interruption. 8. Progress state agrees with actual chapters and word counts. 9. Final manuscript, current evaluations, package and EPUB pass source-bound verification. A complete file alone is insufficient. 10. The process finishes without operator intervention, releases owned native work, and can verify a completed book on resume without another model call. Fault-injection tests separately cover interrupted response publication, interrupted chapter promotion, stale reviews, changed files, missing journals, budget exhaustion and export corruption. They cannot establish literary merit. ## The 90/100 bar Do not assign a combined 90+ score merely because technical checks pass. The literary result uses the existing ten-dimension rubric, two fresh evaluators, median per dimension, then the existing minus-0.8 calibration. The manuscript's calibrated weighted result must exceed 9.0/10, its calibrated floor must meet the existing 8.5 target, the sampled reader gate must pass, the ending must be resolved, and there must be no remaining high-severity audit or blocking proofread findings. Confidence and reviewer disagreements stay visible. These internal simulated readings still do not establish bestseller potential or replace independent human reading and beginner usability sessions. If the bounded run misses that bar, deliver and label the actual complete draft, retain the failing evidence and improve the source before another fresh run. Never ask additional critics merely to fish for a favorable score, lower the threshold, suppress findings, or change the sample to obtain a pass. ## Run it ```powershell python book_genesis.py new C:\Books\MyNovel --host codex --model gpt-5.6-luna --effort high --author "Your Name" --autonomous --chapters 12 --min-words 40000 --max-words 48000 --weighted-quality-target 9.0 --idea "Your book idea" python book_genesis.py resume C:\Books\MyNovel python book_genesis.py status C:\Books\MyNovel ``` Use an explicit author for unattended execution. Run `connect codex` first if the official CLI is not signed in. No API key or credential extraction is used.