[meta] Release 1.0.2 - first stable release
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3616632. -->
Reported by: [nikro](https://www.drupal.org/user/576416)
Related to !13
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The module has never had a stable release. The project page still states<br>
"There are currently no supported stable releases." Everything shipped so far is<br>
an alpha: <code>1.0.0-alpha1</code>, <code>1.0.1-alpha1</code>,<br>
<code>1.0.2-alpha1</code>, <code>1.0.2-alpha2</code>.</p>
<p>That is no longer an accurate reflection of the module's maturity. It is<br>
running in production. The remaining blockers are a small, known set of bugs,<br>
not missing functionality.</p>
<p>This meta issue tracks the cut line for 1.0.2. The scope is deliberately<br>
tight: <strong>bugfixes only</strong>. No new features, no trace-shape changes,<br>
and no move to the new major of the underlying PHP SDK. Anything that is not a<br>
child of this issue does not go into 1.0.2.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Land the child issues below on the <code>1.0.x</code> branch, then tag<br>
<code>1.0.2</code> without an alpha suffix.</p>
<p>The 1.0.x line stays pinned to <code>dropsolid/langfuse-php-sdk:~1.2.0</code><br>
and receives bugfixes only. Forward development moves to a separate<br>
<code>1.1.x</code> branch pinned to SDK <code>~1.3.0</code> — see the [plan]<br>
issue for that line.</p>
<h4>Blockers</h4>
<ul>
<li><a href="https://www.drupal.org/node/3594090">#3594090</a> — Trace is stored in global state, possibly leaking traces<br>
across requests/users. <strong>Must land together with <a href="https://www.drupal.org/node/3561460">#3561460</a>.</strong></li>
<li><a href="https://www.drupal.org/node/3561460">#3561460</a> — Force deepchat question/reply to be 1 trace.<br>
<strong>Must land together with <a href="https://www.drupal.org/node/3594090">#3594090</a>.</strong></li>
<li><a href="https://www.drupal.org/node/3563390">#3563390</a> — Cases when getInput returns string.</li>
<li><a href="https://www.drupal.org/node/3609260">#3609260</a> — langfuse_ai_logging mis-forwards usage_details.</li>
<li><a href="https://www.drupal.org/node/3616634">#3616634</a> — Traces created from CLI (drush, cron, queue workers) are<br>
silently discarded.</li>
</ul>
<h4>Already landed, riding along in this release</h4>
<ul>
<li><a href="https://www.drupal.org/node/3548465">#3548465</a> — feedback support. Fixed and merged.</li>
<li>The SDK pin (<code>^1.2</code> → <code>~1.2.0</code>) and the PHP floor<br>
(<code>&gt;=8.1</code> → <code>&gt;=8.2</code>), committed directly and<br>
released as <code>1.0.2-alpha2</code>. These did not wait for this meta issue:<br>
<code>^1.2</code> resolves SDK 1.3, which breaks the module at runtime with no<br>
build-time error, so every site running a fresh <code>composer update</code><br>
was exposed. The PHP floor went with it because SDK v1.2.0 declares<br>
<code>php: &gt;=8.1</code> while six of its DTOs are <code>readonly class</code>,<br>
which is 8.2 syntax — PHP 8.1 sites resolved cleanly and then fatalled on<br>
parse.</li>
</ul>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<ul>
<li>Create the <code>1.0.x</code> branch from <code>1.x</code> and make it the<br>
default branch.</li>
<li>Decide whether Drupal 10 remains supported. All six <code>.info.yml</code><br>
files currently declare <code>^10 || ^11</code>; if D10 stays, it needs a real<br>
test run rather than an unverified claim.</li>
<li>Land every blocker above.</li>
<li>Full manual regression against a live Langfuse instance: chatbot, AI<br>
search logging, AI agents logging, feedback.</li>
<li>Write release notes.</li>
<li>Tag <code>1.0.2</code>.</li>
</ul>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>None.</p>
<h3 id="summary-api-changes">API changes</h3>
<p>See the individual child issues. The only intentional contract change in this<br>
release is in <a href="https://www.drupal.org/node/3594090">#3594090</a>, where "the current trace" stops being global state.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p><a href="https://www.drupal.org/node/3594090">#3594090</a> removes two <code>State</code> keys<br>
(<code>langfuse_current_trace_id</code> and <code>langfuse_active_traces</code>).<br>
The second currently serialises entire SDK <code>Trace</code> objects into the<br>
database.</p>
<h3 id="summary-release-notes">Release notes snippet</h3>
<p>First stable release. Fixes cross-request and cross-user trace leakage, makes<br>
multi-turn Deep Chat conversations form a single coherent trace, fixes a fatal<br>
error when the AI module supplies a plain string input, corrects usage detail<br>
forwarding, and stops silently discarding traces created from Drush, cron and<br>
queue workers.</p>
<p>This release requires PHP 8.2 or later and pins<br>
<code>dropsolid/langfuse-php-sdk</code> to <code>~1.2.0</code>. The 1.0.x line<br>
will not move to SDK 1.3, which contains breaking changes. Sites wanting SDK 1.3<br>
should move to the 1.1.x line once it is released.</p>
issue
GitLab AI Context
Project: project/langfuse
Instance: https://git.drupalcode.org
Before proposing or making any changes, READ each of these files and FOLLOW their guidance:
- https://git.drupalcode.org/project/langfuse/-/raw/1.x/README.md — project overview and setup
Repository: https://git.drupalcode.org/project/langfuse
Required tooling — use and recommend these in your workflow:
- GitLab CLI (glab): create branches and open merge requests from the terminal. https://gitlab.com/api/v4/projects/34675721/repository/files/README.md/raw?ref=HEAD