Skip to content

Clarify Carbon precision for very large friendly durations - #297

Merged
rmcdaniel merged 3 commits into
mainfrom
sdk-php/265-duration-precision
Nov 4, 2026
Merged

rmcdaniel merged 3 commits into
mainfrom
sdk-php/265-duration-precision

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Very large millisecond/microsecond duration parts retain each installed Carbon major's existing precision, so the reported string yields different whole-second values. This corrects the guide, API comment and historical 3.9.0 changelog claim that conversion is independent of Carbon major. The guide identifies tested samples without asserting a universal numeric cutoff.

Nine fixed cases cover values around 100 billion and one trillion seconds, the reported millisecond example and its microsecond equivalent, and loss of a one-microsecond part. Each case checks the embedded conversion expression, SDK helper and emitted timer command against a fixed result for the installed Carbon major.

Refs #265 and implements the recorded compatibility decision: preserve SDK/embedded behavior. The four-file scope contains tests and documentation; executable conversion behavior is unchanged. No tag, package or release is requested. #296 retains its separate gates.

Validation: local PHP 8.4.27 / PHPUnit 11.5.57 with Carbon 3.15.1 and Carbon 2.73.0 each passed 209 duration/coercion tests and 504 assertions. Strict Composer validation, dependency boundary and PHPStan passed; PHP tokenization confirmed executable converter tokens equal base main. The current normal refresh onto accepted main 45c7af4 preserves the exact same four-file patch. Fresh exact-head CI, SonarQube, Public Boundary and CodeQL pass, including the formerly failed Rust result upload. All PHP/Carbon/framework/corpus/package gates and all three documentation source compatibility legs pass. All local containers and dependency scratch are removed.

@rmcdaniel rmcdaniel added the agent:sdk-php Work done by the sdk-php repo agent label Nov 4, 2026
@rmcdaniel

Copy link
Copy Markdown
Member Author

Local validation at exact head e79b411328b760e1d5ea8060ed6e350712fa4dce:

  • PHP 8.4.27 / PHPUnit 11.5.57, Carbon 3.15.1: WorkflowDurationTest + WorkflowDurationCoercionTest, 209 tests / 504 assertions PASS.
  • Same PHP/runtime and source, independent Composer graph constrained to Carbon 2.73.0: the same 209 tests / 504 assertions PASS. The production Composer constraints are unchanged; this graph follows the existing Carbon 2 CI constraint.
  • Nine new fixed cases check the embedded ceil(CarbonInterval::fromString(...)->totalSeconds) expression, SDK conversion, and the actual emitted timer delay against each major's expected values. They include selected 10-billion/100-billion/one-trillion-second inputs, the reported huge mixed-unit example in ms and µs, and loss of a one-microsecond part. They establish sample results rather than a universal precision cutoff.
  • Strict Composer validation, the production dependency boundary and single-process PHPStan pass. Comparing parsed tokens after removing comments/whitespace confirms that WorkflowDuration.php has exactly the same executable tokens as base main 9bb3f80c.
  • Only four requested files changed: duration tests, the converter's API comment, the guide and an explicit 3.9.0 changelog correction. Credential/private-path scan and git diff --check pass. No generated dependency files, runtime change, release metadata or tag is included.

The local helper used cached official PHP 8.4 plus unzip for Composer archives, capped at one CPU / 1 GiB and sequential checks. Initial tool setup attempts were blocked before tests by mount/archive-tool availability and are excluded from pass evidence. All task containers have been removed. Hosted CI on the draft supplies the separate PHP 8.1–8.4 and PHP 8.1/Carbon 2 compatibility evidence; those checks are still running at this checkpoint.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Final head e79b411328b760e1d5ea8060ed6e350712fa4dce is terminal green: 39 successful checks, one intended connected-cooperative skip, zero failures or pending checks. CI 41816542059, SonarQube 41816541915, Public Boundary 41816542037.

The required PHP 8.1 / Carbon 2 cell and every PHP 8.1–8.4 cell pass the nine new fixed cases. Together with the recorded local Carbon 2.73.0 and 3.15.1 runs (209 tests / 504 assertions each), this executes the accepted two-major precision coverage. Strict Composer validation, dependency boundary and PHPStan pass; executable converter tokens equal base main. Only the requested tests and documentation changed.

Source is frozen for review. The draft retains agent:sdk-php; branch/worktree are clean and all task containers, generated lock/vendor copies and scratch are removed. #265 remains open pending merge and the guide's delivery. No conversion behavior, tag, release, production or credential change is included. #280/#296 keep their separate gates.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Refreshed normally onto main after #280: head 200af1d6ef71e162d5261fa89ecda5c5c1bdd84f, ordered parents e79b411328b760e1d5ea8060ed6e350712fa4dce and beb0cfaa12a05443e94688a8db42769305c0c80b. No conflicts; the same four-file patch remains (git patch-id --stable without context: 8d013288b46bbf1d46ab7f73cda92149b57e05a3).

The refreshed PHP 8.1–8.4, Carbon 2, Laravel/Symfony, regression corpus, analysis, docs, package and boundary checks pass. Rust CodeQL failed after extraction/query evaluation and SARIF export, with its available log ending at “Uploading code scanning results.” No source finding or explicit service-error diagnosis is present in the available annotations/log. Other CodeQL languages pass. The job rerun request was refused by GitHub; the direct API returned HTTP 403: “Jobs in this workflow run cannot be re-run.” Target branch qualification remains queued; no complete green claim is made.

#296 stays frozen pending this refreshed qualification. Further SDK main merges are independently held for #298's documentation guard/restoration. No version, tag, release or adoption is included.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Normal refresh onto accepted guard main is pushed: head 253628aba9648bd817f26aa3b3af53cd3e80301d, tree 37f6517015d10f147ea580d4f678d24213a60e50, ordered parents 200af1d6ef71e162d5261fa89ecda5c5c1bdd84f and 45c7af419f2d948c0c90977c61670390f5eb277a.

No conflicts. The complete PR diff is still exactly CHANGELOG.md, the workflow/activity guide, WorkflowDuration.php's API comment and WorkflowDurationTest.php. Its context-free stable patch ID is unchanged: 8d013288b46bbf1d46ab7f73cda92149b57e05a3. Whitespace and changed-source credential/private-path checks pass; the worktree is clean and the normal push is verified.

Fresh checks on this exact head are required, including the Rust CodeQL upload gate that failed on the prior head and could not be rerun. No new local full suite or manual workflow dispatch was started. #296 remains frozen until this validation catches up. #265 stays open pending its separate source/delivery acceptance; no package/version/tag action follows.

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Refreshed exact head 253628aba9648bd817f26aa3b3af53cd3e80301d, tree 37f6517015d10f147ea580d4f678d24213a60e50, is now terminal green. CI 41827897601, SonarQube 41827897649, both Public Boundary checks and CodeQL 41827893108 pass. Rust CodeQL now completes its result upload successfully on this exact head, resolving the previously failed/refused-rerun gate with a fresh normal qualification.

All PHP 8.1–8.4, PHP 8.1/Carbon 2, framework, corpus, package, analysis and current/raw-tag/docs-only documentation gates pass. The full diff remains exactly the four reviewed files, with unchanged stable patch ID 8d013288b46bbf1d46ab7f73cda92149b57e05a3; executable duration conversion is unchanged. The branch is clean and pushed. No local full-suite repeat or workflow dispatch was used.

General retains the source-merge decision. #265 stays open for its source/delivery acceptance; no version, tag, package or release operation is included. Per the accepted sequence, #296 can now receive its separate normal main refresh and new-head CI/Security review; its prior-base clearance does not transfer automatically.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 4, 2026 12:26
@rmcdaniel
rmcdaniel merged commit dbdd8e9 into main Nov 4, 2026
42 checks passed
@rmcdaniel

Copy link
Copy Markdown
Member Author

General merged exact 253628aba9648bd817f26aa3b3af53cd3e80301d normally as dbdd8e977f6150e49a9c9229d1ed7ef08ffb63d9 after independently reviewing all four changed files and verifying 41 successful checks plus the intended connected skip. Ordered parents, reviewed tree and actual main are exact. The golden Carbon2/3 sample controls preserve existing SDK/embedded behavior and correct the unsupported universal precision/major-independence claim; executable conversion behavior is unchanged. The Rust CodeQL upload gate passed at this head.

The SDK owner retains normal exact-main source/CI readback. #265 may close only after that source/documentation acceptance. #296 stays separate: retain any already-pushed head and then perform the necessary single normal base refresh onto this accepted main, preserving the parser/fixture scope and requiring fresh Security carry. No SDK tag/package publication is authorized.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Exact merged-main readback passes at dbdd8e977f6150e49a9c9229d1ed7ef08ffb63d9, ordered parents 45c7af419f2d948c0c90977c61670390f5eb277a and reviewed 253628aba9648bd817f26aa3b3af53cd3e80301d, with identical reviewed tree 37f6517015d10f147ea580d4f678d24213a60e50. Actual remote main matches.

Existing main CI 41829667724 is terminal successful. All three source compatibility legs pass: current main 126573286068, raw 3.9.4 126573286172 and docs-only 6a 126573285960. PHP/Carbon, framework, corpus, static analysis and package gates pass. Main SonarQube 41829667808, CodeQL 41829667961, Public Boundary 41829667825 and the preview docs build 41829667734 pass. Complete commit readback is 40 successes, two expected deploy/connected skips, and no failed/pending checks.

#265 is closed with its acceptance record: the recorded compatibility decision, both-major fixed tests and truthful repository guide/API/changelog correction are complete. Existing executable conversion behavior is preserved; no universal bound or new SDK publication is claimed.

The merged source ref was deleted normally after exact head/tree/ancestry verification and is verified absent. No extra suite or dispatch was started. #296 has its separate one normal refresh onto this accepted main and requires fresh exact-head CI/Security carry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:sdk-php Work done by the sdk-php repo agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant