Simplify Tempest external API surface

Open
#83 3 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@JamesHWade is already working on this.

Since Sep 19, 2026.

Assessment

This issue has not been assessed yet.

Description

migrated-from-kata

Migrated from Kata tempest#pjsd on 2026-09-19. Original author: james; created: 2026-08-20T12:20:09.592Z; updated: 2026-09-17T15:06:38.973Z. Original state: open.

Original owner: james.

Original issue

Context: Tempest is pre-production and currently exposes 63 functions plus large R6, callback, and Shiny-handle surfaces. The package should be one research product, not a product plus extension SDK, compiler front end, evaluation toolkit, and host framework. Scope: make a hard 0.3 contract reset with no deprecated aliases, forwarding wrappers, old-schema readers, dual source representations, always-rejected arguments, Agent SDK compatibility, Tempest OKF subsystem, or historical export fixtures; converge on the exact 19-name product and Graft-authority API in dev/plans/2026-08-20-external-api-simplification.md; reduce result/session/method/condition/callback surfaces; keep one exact current persisted format; preserve STORM, Co-STORM, accepted Graft knowledge, evidence inspection, save/resume, bundled app, trajectory review, and explicit Graft proposal-to-receipt authority. Acceptance: every retained surface has one product use and source/installed contract tests; every removed capability is explicit; typed resources are canonical; Deputy correlation works without SDK compatibility; tempest_knowledge() accepts only a pinned Graft view, an immutable bounded record allowlist, and explicit governed-procedure bindings; every consumed accepted record has exact revision provenance and usable citeable evidence; out-of-scope, truncated, and instruction-shaped content fails closed or remains untrusted evidence; each stacked PR is independently documented and green; the stack tip exposes exactly 19 functions, six session methods, six read-only session bindings, one S3 method, and six public condition categories.

Original comments (10)
james — 2026-08-20T12:37:38.821Z

Scoped plan written at dev/plans/2026-08-20-external-api-simplification.md on exact stacked base aced5e0d7c0b5e01eb3dff70b377ce75b3a6392f. Decision: teach a 10-function primary product API; retain explicit advanced, host, and extension tiers; make a first 0.3 namespace cut from 63 to 60 by de-exporting ResearchWorkspace, internalizing tempest_research_manifest(), and deleting dead tempest_validation_result(). Keep TempestRetriever and tempest_suggest_questions() because they preserve distinct extension/host capabilities. Exact tier partition 10/25/18/7/3, Air and whitespace checks pass, and two independent adversarial reviews approve with no P0-P2 findings. No implementation, commit, push, or release action performed.

james — 2026-08-20T23:01:18.061Z

Supersedes the earlier conservative 63-to-60 scope. Revised plan on exact base aced5e0 targets a clean 19-export Tempest 0.3 product surface with five stacked PRs: shallow compatibility and SDK cleanup; typed-resource-only evidence; expert/current-schema reset; cohesive product result/session/knowledge boundary; and removal/internalization of extension, compiler, evaluation, host, Shiny-module, progress-framework, and Agent Skill APIs. New cohesive names are tempest_app(), tempest_report(), and tempest_knowledge(); no compatibility aliases. Both independent product/authority and implementation/sequence reviews approve the current plan with no P0-P2 findings. Static count and whitespace checks pass. No implementation, commit, push, or release action performed.

james — 2026-08-20T23:13:42.377Z

Revised architecture decision: remove the complete Tempest OKF subsystem rather than wrap it. Graft becomes the sole external-format compatibility and accepted-knowledge boundary: adapters may produce reviewable proposals, explicit commit creates authority, and Tempest consumes only a pinned GraftView through tempest_knowledge(graft_view, governed_procedures = NULL). The 19-export target is unchanged. Direct provisional ingestion of arbitrary OKF directories is intentionally retired; Graft's existing managed OKF path is a round-trip projection, not generic third-party import. PR A now deletes the parser, four exports, two print methods, tests, fixtures, vignette/help, and sole yaml dependency. PR D adds bounded accepted-record/claim/evidence materialization with exact revision provenance, rejects non-materializable records, keeps ordinary evidence separate from executable procedure bindings, and persists only consumed projections plus path-free snapshot identity. No implementation, commit, push, or release action performed.

james — 2026-08-20T23:19:53.344Z

Final Graft-only contract refinement: tempest_knowledge(graft_view, record_ids = character(), governed_procedures = NULL) uses a canonical immutable allowlist capped at 1,000 accepted record IDs; the value is rejected when both evidence scope and procedure bindings are empty. Tempest does not duplicate Graft search/filter APIs. It validates every allowed ID at the pinned snapshot, confines all reads to that scope plus directly joined claim/evidence/source rows, rejects truncated or non-materializable packets before provider work, and injects accepted text only through a delimited evidence/data channel. tempest_sources() reads only completed runs or sessions, never a fresh knowledge value. Resume matches snapshot, allowlist, and binding digests. Independent final review: APPROVE, no remaining P0-P2 findings. Air and whitespace checks pass; exact target remains 13 product plus 6 authority exports. No implementation, commit, push, or release action performed.

james — 2026-08-22T00:00:37.968Z

Full five-layer stack implemented and published as native GitHub stack #53.

Layers, each independently documented, tested, installed, and check-clean:

  • #51 codex/tempest-api-reset-a-compatibility (position 1) — compatibility surface reset. Ready, green, mergeable.
  • #52 codex/tempest-api-reset-b-evidence (position 2) — typed-resource-only evidence. Ready, green, mergeable.
  • #54 codex/tempest-api-reset-c-schema (position 3, head 0a11c04) — expert and product schema reset. Ready, green, mergeable.
  • #55 codex/tempest-api-reset-d-product (position 4, head 749bab8) — cohesive product boundary. Ready, green, mergeable.
  • #56 codex/tempest-api-reset-e-surfaces (position 5, head 87263c4) — 19-export namespace. Draft; CI green except one job still running at time of writing.

Target contract reached and verified against a fresh isolated install, not only the dev namespace: exactly 19 exports, one S3 registration (print.tempest_knowledge), six TempestSession operations (warmup, step, suggest_questions, add_expert, retire_expert, publish), six read-only session projections (session_id, topic, status, experts, transcript, mindmap), and six public condition categories.

Verification per layer at its exact head: full source suite with zero failures, warnings, and skips; installed-library suite with zero failures and one expected skip for a compiler path absent from an installed package; R CMD check with zero errors and zero notes; devtools::document() twice with a clean second run; pkgdown::check_pkgdown() clean; air format --check and git diff --check clean.

Two deviations from the plan, both forced and both recorded in the commits, PR bodies, and plan files:

  1. The Co-STORM session operation is publish(), not the planned finalize(). R6 reserves finalize as the object destructor and already warns it must be private, so session$finalize() is not a viable public method. publish() also matches the codebase's existing publication-authority vocabulary.
  2. TempestKnowledge carries the tempest_knowledge S3 class in addition to its S7 class. Without it the planned print.tempest_knowledge registration would satisfy the count while never dispatching, because S7 objects do not carry a bare S3 class.

One real regression was introduced during PR D and caught before publication: removing the session$workspace active binding made tempest_answer_source_ids() resolve its workspace through a bracket lookup that returned NULL instead of erroring, so Co-STORM saw no cited sources, skipped extraction, and silently dropped a claim from the product. Only the deterministic Co-STORM baseline caught it. The helper now takes a validated workspace directly and the baseline is byte-identical again.

R CMD check caught two live defects that the test suites could not: a documentation example calling a progress callback with the pre-PR-D S7 accessor, and tempest_costorm_evaluation_product() still passing removed arguments to tempest_session(). Both are fixed.

Not merged. The native stack merge remains pending explicit user authorization, and #56 is still a draft.

james — 2026-08-22T02:15:25.237Z

Merged. Native stack #53 merged atomically into main as commit 2e38fc8f43efa56019998374981cb0b58534883f, on explicit user authorization.

All five layers report merged=true against the same merge commit: #51, #52, #54, #55, #56.

Pre-merge verification immediately before the operation, at the exact heads that were tested: #51 d0b5e43, #52 45f4648, #54 0a11c04, #55 749bab8, #56 87263c4. Every layer ready (not draft), mergeable=true, zero failing checks, zero pending checks, and correct stack positions 1 through 5 of 5. main was still at 21e1794, the stack base, so no drift had occurred.

Post-merge verification against origin/main at 2e38fc8: NAMESPACE contains exactly 19 exports and one S3 registration, print.tempest_knowledge. The 19 names are tempest_app, tempest_claim_supports, tempest_claims, tempest_config, tempest_expert, tempest_graft_plan, tempest_graft_schema, tempest_knowledge, tempest_promotion_bundle, tempest_promotion_receipt, tempest_read_promotion_bundle, tempest_report, tempest_run, tempest_save_promotion_bundle, tempest_session, tempest_session_resume, tempest_session_save, tempest_sources, and tempest_trajectory_review. R/evals.R and R/simulated-user.R are absent as intended.

Remaining follow-up: the plan files merged with layer 5 still describe it as publication pending, because the status update was deliberately not committed onto a verified-green tip. That correction belongs on main now that merge evidence exists.

james — 2026-09-17T11:53:27.624Z

The owner approved the follow-up to Graft PR #68 and issue JamesHWade/graft#64: a public Tempest artifact evidence input and cross-run reuse proof. The September 2026 decision supersedes the old requirement that all accepted evidence require a Graft view; backwards compatibility is not required. Work is isolated on codex/artifact-knowledge-input at /tmp/tempest-artifact-input-20260917. Scope: exact selected content/revision/dependency/provenance validation, STORM and Co-STORM admission, restart/correction evidence, docs and site. Storage approval and current consultation eligibility remain host-owned. Full Graft retirement and future artifact acceptance are subsequent decisions.

james — 2026-09-17T12:29:16.767Z

Implemented the artifact-input slice in https://github.com/JamesHWade/tempest/pull/71, linked to Graft #64. The public constructor validates exact content and dependency references; both research constructors retain the selection, and STORM/session persistence supports reuse without a Graft view. Formats are 6/9/12 with no compatibility readers. The full local suite passes with two existing dsprrr deprecation warnings; package check (tests run separately) has 0 errors, warnings or notes, and the documentation site builds. The real Graft migration/reuse fixture passes 25 additional assertions without Graft available in the consumer process. Keep this broader issue open: future acceptance into artifact storage and the rest of the external API work remain.

james — 2026-09-17T13:42:38.733Z

The public-consumer slice is implemented in #69 with Tempest in JamesHWade/tempest#71. The final experiment pin is 6d3386cbbe22fdc0c1539c436e3ab2f4660567f3.

The complete six-experiment suite passed against that commit, including 121 native migration assertions and 25 public consumer assertions. The fresh consumer process cannot load Graft. Initial, unchanged and corrected evidence selections survive public session save/resume; the host checks purpose and withdrawal before admission. Content bytes, dependencies, receipt values and array order remain exact, with JSON object members canonicalized. The recorded receipt and updated docs/site describe this boundary.

Tempest review fixes additionally cover fresh-process STORM re-admission, stable evidence retrieval times, unambiguous resource IDs, reordered JSON fields, malformed claim/content rejection and consistent restore errors.

Keep #64 open. Next is the research-to-artifact acceptance/correction/withdrawal cycle, followed by the retain/reduce/retire decision. This slice makes no model requests and does not claim new research acceptance or production recovery.

james — 2026-09-17T15:06:38.973Z

The public artifact-input and reuse slice is ready in Graft #69 at 8c9fa6c and Tempest #71 at 6d3386c. Both PRs have green final-head CI, completed final-head reviews and no unresolved review threads. Merge Tempest first.

The six attested offline experiments pass, including 121 native migration assertions and 48 public-consumer assertions. Initial, unchanged and corrected selections are saved and restored in independent processes with Graft unavailable in both. Tests bind every record ID, revision and class to its exact content; preserve the unchanged acceptance's distinct receipt and source snapshot; recheck host eligibility before resume; and inspect the re-saved restored selection. Withdrawal after save and a mismatched saved selection are rejected.

Consumer receipt and current migration receipt record the evidence. The original historical migration receipt remains separately labeled. README, domain context, ADR, reports, package docs and site guidance are updated.

Keep #64 open. Next is the research-to-artifact acceptance/correction/withdrawal cycle, followed by the retain/reduce/retire decision. This slice makes no model requests and does not claim new research acceptance or production recovery.

Original text and dates above are historical records. GitHub is now the active tracker; earlier API plans and bare issue references may describe superseded work.

Dominant language
R
Stars
1
Forks
0
Avg merge
19h 6m
Merged PRs (30d)
12

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JamesHWade/tempest

All issues in JamesHWade/tempest

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.