Repository navigation
P0 physical PTP stale-role recovery + verified Time Sync clipboard #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
masarray
wants to merge
16
commits into
fix/p0-ptp-profile-contract-20261020
Choose a base branch
from
fix/p0-ptp-stale-role-recovery-clipboard-20261021
base: fix/p0-ptp-profile-contract-20261020
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
70da762
fix(ptp): hold one bounded physical runtime recovery intent through v…
masarray 9876f7a
fix(ptp): recover stale board RUNNING only after STOP ACK/readback, e…
masarray 89e8600
fix(studio): clipboard adapter verifies actual OS readback
masarray a948eb4
fix(studio): do not report success when Windows clipboard write fails
masarray d0e3057
ux(studio): in-app selectable diagnostic fallback and truthful copy s…
masarray 404bcd7
fix(studio): do not silently claim firmware diagnostics copied
masarray f200fb5
fix(studio): explicitly import registered StudioClipboard singleton i…
masarray 701e09b
ux(studio): show truthful firmware clipboard result adjacent to Copy …
masarray 9e56bb4
test(ptp): cover physical stale role recovery, bounded retries, STOP …
masarray a3caf34
test(studio): verify native Qt clipboard roundtrip and refuse false s…
masarray 9ea3f12
test(studio): add native clipboard roundtrip harness using production…
masarray 4887471
ci(studio): exercise actual GUI clipboard roundtrip on Windows and Linux
masarray 0ca8106
ci(studio): require native clipboard roundtrip before packaging match…
masarray 8676f03
fix(ptp): second stale-runtime rejection is terminal STOP-UNVERIFIED,…
masarray 97a7876
test(ptp): second stale RUNNING rejection locks into manual STOP reco…
masarray 799b664
test(studio): enforce shared PTP recovery and real clipboard success/…
masarray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| // SPDX-License-Identifier: GPL-3.0-or-later | ||
| // Native GUI clipboard contract: exercise the SAME production adapter as Studio. | ||
| #include "StudioClipboard.hpp" | ||
|
|
||
| #include <QClipboard> | ||
| #include <QGuiApplication> | ||
| #include <QString> | ||
|
|
||
| int main(int argc, char** argv) { | ||
| QGuiApplication app(argc, argv); | ||
| StudioClipboard clipboard; | ||
| auto* osClipboard = QGuiApplication::clipboard(); | ||
| if (osClipboard == nullptr) return 2; | ||
|
|
||
| if (clipboard.copyText(QString{})) return 3; // no fabricated success | ||
| constexpr auto kHeader = "ARStack Studio field diagnostics"; | ||
| const QString evidence = QString::fromUtf8( | ||
| "ARStack Studio field diagnostics\n" | ||
| "Installed firmware: df73fea0b68e7f47\n" | ||
| "PTP START error: PTPROLE rejected: stop PTP before changing operating role\n" | ||
| "SVSYNC event: ETHERNET_LINK_LOSS\n"); | ||
| if (!evidence.startsWith(QString::fromLatin1(kHeader))) return 4; | ||
| if (!clipboard.copyText(evidence)) return 5; | ||
| if (osClipboard->text(QClipboard::Clipboard) != evidence) return 6; | ||
|
|
||
| const QString second = QString::fromUtf8( | ||
| "PTP diagnostic: SOURCE running\n" | ||
| "MAC phase ±2 us\n" | ||
| "SVSYNC ACQUIRED\n"); | ||
| if (!clipboard.copyText(second)) return 7; | ||
| if (osClipboard->text(QClipboard::Clipboard) != second) return 8; | ||
| if (osClipboard->text(QClipboard::Clipboard) == evidence) return 9; | ||
| return 0; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If clipboard access fails, this message directs the operator to technical details, but that view displays only
firmware.logText; the value that failed to copy issession.diagnosticsText(), which also contains session state, device identity and telemetry, PTP/SV evidence, and the device serial log. In the failure scenario the requested evidence therefore remains unavailable from this panel despite the recovery instruction. Show the capturedevidencein a selectable fallback, as the Time Sync panel does, or direct the user to a view containing the same text.Useful? React with 👍 / 👎.