Skip to content

About

DiscussionBridge for Statamic — native addon for Flat, DB, and SSG profiles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DiscussionBridge for Statamic V4

One unpublished development addon, version0.4.0-alpha.1, covers Statamic6 Flat, official Eloquent DB, and official SSG profiles. It consumes the exact shared V4 typed runtime, candidate discussionbridge-v4-core-20261029-r7, including its complete privately namespaced Unicode17 URL/IDNA dependency closure. The shared source commit is 09d77c0209835c2d996aad294d161f167c7bd838, including the isolated private-loader correction. This is an implementation candidate, not a release or installed/public qualification. Earlier development protocol selectors, legacy initialization/adoption and dual-codec/profile switching are absent. Normal future upgrades/recovery begin at this new V4 baseline and must preserve existing identities, discussions, configuration, schema/data, accepted history, exact pending mutations, fences and restoration records.

The native Statamic article remains the frame. Simple, Full and Interactive rendering and the existing optional Mermaid/KaTeX assets remain available. Plugin-free topic presenters use the existing public Discourse integration; they do not need a Bridge connection. The optional DISCUSSIONBRIDGE_FORUM_NAME uses native discussionbridge.forum_name, otherwise the validated native forum siteSettings.title. Connected content uses the authoritative V4 Connection.forum_name; there is no second local override or hostname label.

Configure

Install through normal Composer/Statamic addon discovery. The supported native dependencies are PHP8.3+, Statamic6, and the official Eloquent driver or SSG package when that profile is selected. The addon does not bundle an application Composer vendor tree or a Node runtime. The shared codec's pinned private dependency files and licenses do ship under src/Cms/Shared/idna; they require no additional mandatory hosting extensions and are not rebuilt or downloaded during installation.

Use php please discussionbridge:install as the native server administrator. It asks for the protected connection secret and the explicit native profile: statamic_flat, statamic_db or statamic_ssg. Existing environment backup/atomic write, native migrations, optional additive template/assets publication and actual selected-template inspection remain. It does not enable receiver policy or choose native authors/taxonomies. Configure DISCUSSIONBRIDGE_ENABLED, FORUM_URL, SITE_ORIGIN, CONNECTION_ID, SECRET_FILE, LANE, COLLECTIONS and CMS_PROFILE through their DISCUSSIONBRIDGE_ prefixed environment settings; see config/discussionbridge.php. Keep CMS_STATE_DIRECTORY private and outside the public tree. Changing its path is not a reset or import mechanism.

The From destination is the actual configured discussionbridge collection. Its current boundary is nonpropagating, nonstructured/nonorderable, without automatic title generation. The selected native template must invoke the article and selected discussion; the installer and writer preserve it rather than replacing operator templates. A missing or unsupported binding needs attention. Actual generated/public qualification remains separate from inspecting template calls.

Native work

  • php please discussionbridge:reconcile traverses configured native source entries with bounded lazy pagination and enqueues opted-in published authoring editions.
  • php please discussionbridge:work --limit=25 uses that durable queue and the single shared writer to deliver To records. It captures actual persisted native state, not a working-copy preview, and retains exact uncertain POST identities before dispatch. Resource/topic/native IDs and accepted opaque predecessors remain strings; a genuinely changed native edition updates the same binding.
  • php please discussionbridge:sync-publications stages the complete pinned source feed/content, resolves mapping intent, claims existing authorized work and applies the native From path. Flat and DB use the actual native repositories; synchronization and actual anonymous public verification are separate receipts/clocks.
  • php please discussionbridge:cms-catalog authors or taxonomy explicitly refreshes the configured collection's actual supported Users/Terms fields. Opaque repository IDs, native blueprint/cardinality and supported picker scopes govern the snapshot. Durable begin/page/finalize/readback uses sequential pages of at most100 entries and the typed65536-byte request cap. Zero items sends no pages. An incomplete upload preserves the old active snapshot. There is no guessed timer, remote provider refresh, policy enablement or reassignment of unavailable selections. Empty selections preserve new defaults and existing assignments without a catalog gate.

Native To preparation: the selected content blueprint field supplies the actual native Markdown parser/options and configured Antlers context, or native Bard HTML without sets. Supported cases use the ordinary production preparation path. Missing field/site/set presentation and unsupported function/data/reference bindings produce a specific local native_source_html_unqualified diagnostic; they do not imply that all sources need another preparation approval. Full prepared UTF8 SHA/count is calculated before the exact shared full/generated-excerpt helper. Both an oversized source and a valid source whose full JSON envelope exceeds65536 bytes use the declared generated Read More representation. No configuration switch fabricates a new native edition. Source creation/update times are actual nullable facts, never insertion/build/verification substitutes or rounded submillisecond values.

Unformatted text and nontext content are valid sources; formatting/type is not a Bridge eligibility condition. Image-only native Markdown/Bard output has no prose-text test. Bard structured originals retain their typed native value. Ordered Bard sets require an actual article presentation binding; their augmented arrays are never silently string-cast or given guessed partial names. Unsupported presentation is a local Bridge limitation, never a claim that the source is invalid or ineligible. The original native content remains intact.

The source article URL and exact original content are captured together before rendering. Native Field/Value augmentation retains the field's configured parser/options/extensions/renderers and deferred Antlers semantics without altering the global parser. The rendered copy resolves link/media attributes and supported srcset candidates through the installed URI resolver against that captured article URL. Absolute URL semantics remain native; this selects no new allowed scheme/provider policy. Complete prepared HTML is hashed/counted only afterward, before excerpt selection. New private pending/accepted receipts retain the original capture; accepted/pending/history bytes are never recaptured or rebased because a later canonical URL changes.

This is bounded native preparation, not complete portable HTML support. Actual players, embedded applications, styles, active handlers and nonempty script/data blocks without a supported binding report a specific limitation before dispatch; source content is not silently removed or replaced. Ambiguous srcset/data syntax also reports its parser limit. Unknown set/custom presentation, true absence and any new URI/provider/execution/fallback/default choice remain separate cases. Existing string-only source URL move integration is not automatically extended to Bard by field rendering. Current native checks and their exact source/package scope are recorded in the checkpoint.

The existing content-derived revision identifies the actual complete prepared snapshot under current published-source authority and predecessor CAS. Actual source dates remain unchanged or unknown when that is the native fact. A candidate/configuration label alone does not mint a source edition. No blanket raw-editor-token requirement or preparation-change gate is added, and no accepted or pending article is rewritten during the private pair upgrade.

For an established NEW-V4 To binding, supported native unpublication, deletion or loss of the native opt-in/allowed collection captures the real persisted source and accepted nonnull revision before the native operation can erase them. The existing work command sends the exact journaled V4-05 withdrawal; the resource/topic/discussion and accepted edition/history are retained. This binding-only action does not prepare article HTML or promise native/public privacy. It does not reactivate a withdrawn binding. No native policy_excluded trigger is invented.

The stock Flat and configured stock Eloquent entry factories use subclasses that wrap the actual native save/delete methods. Their ordinary, quiet and direct repository operations join one source writer and completion context. A completed cancelled/failed operation with unchanged persisted state restores the exact prior queue/count/retry time and retains its abandoned capture history. Actual persisted closure is authoritative even if a later native callback throws. Custom entry factories/classes and cached unwrapped eventful objects cannot supply the outer completion witness and their closing operation is rejected before capture; custom repositories, raw filesystem/SQL writes and outer native DB transactions are not claimed covered. Interrupted operations without a completion witness remain local reconciliation limits; PID disappearance or unchanged storage alone does not prove that a DB command cannot still commit.

If an earlier accepted edition A coexists with uncertain pending02(B), withdrawal preserves B and its exact journal without replaying or promoting it. Current scoped04(A) permits05(A) under receiver CAS. A differing04 revision or05 revision conflict preserves A, B and native closure for local reconciliation. A lost05 response replays the identical mutation after restart. From policy.enabled is not added as a To withdrawal gate; current connection, direction, scope, binding and exact accepted revision still govern.

Current From preservation boundary: valid captions, table spans/groups, list numbering and passive image meaning survive. Relative links/images resolve from the validated actual Source.topic_url using the existing URI resolver and existing HTTPS/no-userinfo predicate. The complete pinned source is retained. Meaningful player/provider/structured-media content that this native renderer cannot yet faithfully represent is refused before mutation, with a durable local content limitation. This is not a new receiver Failure code or a claim of receiver Work_attention. Existing-order positive per-mapping claims allow unrelated work to proceed; an exact known still-unrepresentable work/cycle/source/policy is not repeatedly claimed. New source, withdrawal, current terminal authority or faithful repair is reevaluated; no count/time reset, permanent mapping blacklist, global manual gate or automatic central-attention retry is added. No arbitrary provider/iframe policy or new shared HTML rule is selected.

Native details/summary disclosure, initial open state and native group name survive import and the owned-article render pass. The existing optional Mermaid/KaTeX and configured Discourse discussion components remain specific supported functions; displayed source code stays content. Imported script initialization, recognized event-handler interactions and native form/control behavior with no supported article binding produce a specific lost_function diagnostic in the existing private local issue before mutation. Existing media issue identity is retained when diagnostics become more specific, so the same held Work does not consume another claim. The operator must decide how an unrepresented function is to proceed; keeping original bytes does not make a broken copy equivalent. This adds no execution permission/ban, automatic fallback, generic UI or wire error. Inert data scripts and escaped code do not imply an executable function; script-type recognition follows the HTML script preparation rules and JavaScript MIME essence definitions.

If this article path would remove actual nonempty inert script data, it instead records a separate local lost_data limitation with the removed data's byte count/hash before mutation. It does not call that data executable, invent a code-block conversion or declare the lossy copy equivalent. The complete original Source stays pinned. This data limitation uses the existing exact Work/local recovery path; it creates no wire error or global gate.

Flat and DB From save fences apply to owned/mapped/reserved entries. Normal, quiet and direct native repository saves share the per-entry lock and persisted expected-original revision. Stale editor/worker writes reject; cancellation/throw releases the lock. The separate To save/delete context above applies only to tracked native To sources. Custom repositories and unsupported propagation/structure remain unsupported. Raw out-of-band filesystem/SQL edits are detection limits, not a claimed native-editor fence. Native state/owned fragments, receiver source hash and actual rendered-fragment hash are distinct.

Protected SSG

php please discussionbridge:ssg-prepare reconciles the native To queue and invokes the protected From static coordinator. The actual generator is statamic:ssg:generate, with full generation, strict warning failures, supported same-process ConsecutiveTasks, no symlinks, contained output and inspected copy sources. It requires explicitly configured local structured deploy/reconcile/restore hooks in discussionbridge.cms_static_hooks: each contains argv (a native executable and arguments), cwd and timeout_seconds. Remote requests never select shell commands. Unbound production deployment remains attention.

The current protected generator binding and ordinary native tests target official SSG4.1.0, matching the existing sandbox runtime. SSG4.2 changes the completion-callback API and is not qualified by this binding; it is not silently accepted or substituted during this shared-runtime update. The existing unsupported-presentation guard remains intact. Supporting a different native callback/recovery binding is separate work, not a successful fallback.

The coordinator preserves native snapshots, current lease/fence/ownership, command ID/PID/receipt, generated artifact manifest and exact pending prepare/finalize/abort mutations. Exit0 alone is insufficient: actual completion, expected files/owned rendered fragments/copy bytes/containment/freshness and artifact hashes are checked before deployment. The supported console output path renews between native generation steps in the owning process. There is no periodic renewal guarantee inside a silent render/gather/clear/copy, quiet mode or forked worker. Failed/expired renewal prevents deployment. A lost command receipt is reconciled with the configured native owner; uncertain commands are not blindly rerun. Finalization needs actual anonymous canonical public proof. Abort reports restoration only after native/artifact restore and actual restoration proof; an unavailable restore stays explicit.

Ordinary To source URL moves use the existing source writer, supported Entry/repository save fences, exact28–31 journal and a source-specific full Antlers article proof. The bounded caller covers same-site, same-collection, nonstructured/nonpropagating Entry slug saves, including quiet and direct repository saves. Bind the actual collection template in discussionbridge.cms_source_templates; the supported full article path uses the existing discussionbridge:article tag. SSG separately requires the actual configured local deploy/reconcile/restore owner and cms_source_static_public_directory. Full accepted article/native identities and copied original targets stay fixed; generated excerpts change only the owned Read More target. See native source URL moves for the versioned component receipt/profile, exact native/public boundaries, replay, abort and restoration semantics. Separate collection/site/tree/mount/custom/raw-storage changes and independently installed public/receiver bindings are not qualified by those fixtures. Native administrator retry/support reconciliation and applied presentation rebind boundaries remain unresolved; From proof is never To source proof.

Artifacts and validation

Maintainer browser builds stage all output before checking actual dependency notices and managed destinations. The pinned FastDom notice comes from its published README license section, not an MIT metadata label. Unresolved or changed license inputs stop the build. Parent and file links, including initial notice directories and final shared provenance, are refused before writes. Unknown files and modified previously owned notices are preserved. These are offline build safeguards, not customer runtime hooks.

src/Cms/Shared/PROVENANCE.json records the exact shared artifact/member ledger; PROVENANCE.md explains its source and historical boundaries. node scripts/shared-contract.mjs --check verifies every copied runtime, schema, fixture and private dependency byte without fetching anything. Maintainers refresh only from the explicitly selected shared artifact directory with node scripts/shared-contract.mjs --source PATH; that command refuses modified/unowned output and does not perform dependency generation or installation. docs/NATIVE_CARRY_SOURCE_MANIFEST.json records selected predecessor source identities before V4 adaptations; it is not current release evidence. resources/dist/browser-assets-provenance.json records actual current source/output/dependency/license hashes. Existing native fragment/ownership format1 names identify byte encodings, not an old Bridge protocol.

For ordinary development, run composer install and composer test. The declared development dependencies include the official Eloquent and SSG packages used by the native profile fixtures; they do not become mandatory dependencies of a customer's Flat addon installation. php -n scripts/check-shared.php separately exercises the shipped codec without optional extensions. Browser checks use npm ci --ignore-scripts, npm run check, npm run test:browser and npm run build. The normal Composer archive is checked with php scripts/check-package.php ARCHIVE.zip, including every native asset/template and the nested private dependency closure. The GitHub Actions workflow runs native PHP8.3/8.5, browser Node22/24 and a fresh minimal Composer archive consumer. These scoped checks are not installation/public acceptance.

Focused native fixtures use the official CMS/Eloquent/SSG packages with isolated Flat files, real migration-backed Eloquent entries, actual SSG generation and harmless local processes. Known-safe preparation, controlled HTTP and VM browser doubles have explicit limits. No live service/deployment,1000-item installed/public qualification, release or formal review is established. STATAMIC_V4_CHECKPOINT.md records actual commands/results and safe recovery steps and is excluded from the normal Composer archive.

A validated To02/29 content_preservation_unavailable rejection is permanent for its exact request. Its route/status/six-field Error and exact request identity are persisted in the private journal before the SQL queue terminal status; restart never retransmits that rejected request. The original pending capture, accepted article/IDs/history and rejected outcome stay intact. Ordinary actual new published prepared content can form a new02 intent under current connection/native scope and accepted predecessor CAS (or normal new-creation identity/collision checks). An identical request after receiver-only repair is not an automatic probe. Transport uncertainty retains exact mutation replay. Existing SSG readiness is unchanged. The code never applies to From Failure/attention. A producer-local preparation limitation does not fabricate that receiver error.

Administrator attention recovery (r6 candidate)

The adapter probes the closed attention-recovery-1 capability. Unsupported/absent capability leaves actual attention held. The ordinary discussionbridge:sync-publications flow reports requested observations and discovers exact authorized successors even when the publication source revision is unchanged. Each successor uses the new exact-target claim and current native reread/fences; the old Work, mutation UUID/body, native identity and protected history are retained. Pending/retry_wait and local content limitations do not gain a new manual-resume requirement.

php please discussionbridge:check-native-attention performs only requested inspection/reporting. It does not claim, replay recovery, write native content, build, deploy or restore. Reports distinguish known native baseline/candidate/never-applied facts from conflicts and unknown outcomes; report completion never retries attention. Dynamic optional public observation does not replace the ordinary mandatory verification under the new lease.

For the narrow SSG restored-baseline subset, the native owner can preview:

php please discussionbridge:restore-recorded-baseline <inspection-id>

Explicit restoration requires both --apply --deploy-baseline. This uses the already configured native restore command and retained verified baseline/artifact; the command must actually restore the expected generated baseline and serving deployment. Native readback, complete artifact comparison and fresh anonymous public proof must succeed afterward. Missing baseline, foreign/partial state, active or uncertain commands/mutations, or unavailable proof stays Not ready. A lost/uncertain restoration is retained for native reconciliation, not blindly rerun. The control does not admit or retry receiver Work; a fresh forum Check and explicit Settle restored baseline and retry are still required. Applied static candidate adoption is unsupported.

This is source-level implementation with focused reduced-host author evidence, not installed Flat/DB/SSG, live command, public deployment or package qualification. Exact evidence and known limits: planning/v4-attention-recovery-fixes-20261025/STATAMIC_CHECKPOINT.md in the enclosing DiscussionBridge workspace.

About

DiscussionBridge for Statamic — native addon for Flat, DB, and SSG profiles

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages