Skip to content

Commit 8d40f82

Browse files
committed
[green] close website integration formatting and reference checks
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent d84246a commit 8d40f82

6 files changed

Lines changed: 195 additions & 23 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!-- SPDX-License-Identifier: MIT -->
2+
3+
# PyBLE platform source consolidation — 2026-09-11
4+
5+
## Scope
6+
7+
The maintainer requested local commits, recoverable worktree/branch cleanup,
8+
and a pushed pull request targeting `main`.
9+
10+
The integration combines:
11+
12+
- Primary platform work through `66f1916`: reviewed Lenovo tutorial captures,
13+
firmware features and diagram, site-wide v0.6.1 guidance, and the App build-8
14+
offline privacy policy and publication handoff.
15+
- Current `main` through `2ce0e8c`, including patched website dependencies.
16+
- Exact published firmware source `c8f549eeabe6d2b8c2766eab022517944bb09c8c`,
17+
its measured baseline, specifications, host tooling and tests, and the
18+
previously reviewed App connection-lifecycle fixes.
19+
20+
After integration, the complete firmware and firmware-test trees, firmware
21+
specification directory and protocol match `c8f549e` exactly. The website tree
22+
initially matched the deployed primary source exactly. Subsequent pre-PR
23+
formatting changes are whitespace-only; the frozen protocol bytes are retained.
24+
25+
The public protocol copy's relative `../../AGENTS.md` link lacked its target.
26+
`tools/web/public/AGENTS.md` now supplies the exact contributor-guideline bytes
27+
from `c8f549e`, SHA-256
28+
`2462fdb3823bdec527de4da8323fc44570ca95e68f453ac3c469e5c4494072db`.
29+
Both source snapshots are excluded from automatic formatting to preserve their
30+
provenance. Existing publication/link tests caught the missing target and pass
31+
with it present.
32+
33+
## Local verification
34+
35+
- Flutter analysis: no issues.
36+
- Flutter non-golden suite: 894 tests passed.
37+
- Complete website check: formatting, lint, type checking, zero-vulnerability
38+
dependency audit, license checks, 342 tests in 23 files, compatibility check,
39+
and both static and Sites builds passed.
40+
- Publication suite: 41 tests passed; all repository-local Markdown targets
41+
exist.
42+
- Clean-room, SPDX, import-boundary, localization, patch-policy and PR-range
43+
DCO checks passed. SPDX ran against a tracked-source export so ignored
44+
qualification workspaces were not recursively scanned as product source.
45+
46+
The exact firmware source already has its retained full host/build evidence,
47+
described in the [engineering chronology](firmware-v0.6.1-five-board-engineering-2026-09-06.md).
48+
This Git integration does not claim new board qualification. No hardware was
49+
operated, firmware rebuilt, store artifact uploaded or website redeployed.
50+
The [owner-confirmed publication record](firmware-v0.6.1-publication-2026-09-11.md)
51+
and its distinction from incomplete automated HIL remain unchanged.
52+
53+
## Cleanup boundary
54+
55+
Auxiliary worktree directories, including dirty edits and ignored backups, are
56+
archived intact outside the active repository. Git metadata, a verified bundle,
57+
original branch/HEAD mappings and restoration instructions accompany them.
58+
Private qualification experiments are preserved, not silently merged into the
59+
production branch. The primary generated MicroPython board inputs are untouched.
60+
61+
The two remote documentation branch names may be removed after their complete
62+
history is reachable from the pushed integration branch. Opening this PR does
63+
not itself merge or bypass any checks on `main`.

‎tools/web/.prettierignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ coverage/
88
dist/
99
public/brand/
1010
package-lock.json
11+
# Byte-for-byte source snapshots; their provenance depends on unchanged bytes.
12+
public/reference/firmware-v0.6.1/protocol.md
13+
public/AGENTS.md

‎tools/web/public/AGENTS.md‎

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# AGENTS.md — PyBLE contributor guidelines
2+
3+
These rules apply to humans and automated contributors working in this
4+
repository.
5+
6+
## Project identity
7+
8+
**PyBLE** (“Python over BLE”) is a free, MIT-licensed, tablet-first
9+
MicroPython IDE. The Flutter app communicates over Bluetooth Low Energy with a
10+
compatible board running MicroPython and the portable PyBLE agent.
11+
12+
- App: `app/`
13+
- Agent firmware: `firmware/`
14+
- Open wire protocol: PBLE/1, specified in
15+
`docs/specifications/protocol.md`
16+
- Initial validated ports: `esp32`, `esp32-s3`, and `esp32-c3`
17+
18+
Support is capability-defined, not tied to one chip family. A new port needs a
19+
maintained PBLE/1 agent, BLE GATT peripheral support, sufficient resources, and
20+
the project’s conformance and hardware-validation gates.
21+
22+
## Open-source and clean-room boundary
23+
24+
1. All PyBLE-authored source is MIT licensed.
25+
2. Author changes fresh. Do not paste proprietary or unknown-licensed source,
26+
protocols, UUIDs, board profiles, examples, or product-specific pedagogy.
27+
3. Keep PyBLE identifiers independent: `PBLE/1`, `pble_*`, `pyble_*`, the
28+
PyBLE UUID base, and the `PyBLE-` advertising prefix.
29+
4. Run `tools/ci/no_leak.sh` before committing. The gate is the canonical,
30+
tested list of prohibited identifiers in shippable source.
31+
5. Third-party dependencies remain under their own licenses and must be
32+
recorded in the relevant dependency and notice files.
33+
34+
The pinned, gitignored compiler/tool trees at `firmware/.esp-idf`,
35+
`firmware/.arm-gnu`, and `firmware/.picotool` are third-party build inputs,
36+
not shippable source. Source gates prune those exact roots while continuing to
37+
scan similarly named authored directories.
38+
39+
## Spec-driven and test-driven development
40+
41+
1. `docs/specifications/` defines public behavior and architecture.
42+
2. Change the relevant specification before implementation when a contract
43+
changes.
44+
3. Work red → green → refactor:
45+
- add a failing test in a `[red]` commit;
46+
- implement the minimum passing change in a `[green]` commit;
47+
- clean up in a `[refactor]` commit while tests remain green.
48+
4. No behavior is complete without an automated test. Hardware behavior also
49+
needs the documented HIL evidence.
50+
5. Sign off every commit for DCO compliance: `git commit -s`.
51+
52+
Allowed commit prefixes are `[red]`, `[green]`, `[refactor]`, `[docs]`,
53+
`[build]`, and `[chore]`.
54+
55+
## Repository layout
56+
57+
Keep the repository root limited to governance files and these directories:
58+
59+
```text
60+
.github/ app/ docs/ firmware/ protocol/ examples/ tests/ tools/
61+
```
62+
63+
Root governance files are:
64+
65+
```text
66+
README.md LICENSE CONTRIBUTING.md CODE_OF_CONDUCT.md SECURITY.md
67+
CHANGELOG.md CITATION.cff AGENTS.md CLAUDE.md .gitignore .gitmodules
68+
```
69+
70+
Put specifications and decisions under `docs/`, scripts under `tools/` or
71+
`firmware/scripts/`, and examples under `examples/`. Keep raw or unreviewed
72+
screenshots, signing material, builds, assistant state, and local notes out of
73+
Git. A deliberately reviewed, provenance-recorded image used by the public
74+
website may live below `tools/web/public/`; its raw capture must remain in an
75+
ignored workspace.
76+
77+
## Naming
78+
79+
- Product and wordmark: **PyBLE**
80+
- Domain: `pyble.dev`
81+
- Protocol: **PBLE/1**
82+
- Native modules: `pyble_agent`, `pyble_ble`, `pyble_runner`, `pyble_fs`,
83+
and related `pyble_*` / `pble_*` files
84+
- Flutter packages: `lib/ble/`, `lib/pble/`, `lib/editor/`, `lib/console/`,
85+
`lib/files/`, `lib/blocks/`, and `lib/localization/`
86+
87+
## Hard boundaries
88+
89+
- Do not edit upstream MicroPython or Blockly in place. Pin upstream as
90+
submodules; isolate any unavoidable MicroPython patch under
91+
`firmware/patches/` with a written reason.
92+
- Do not make USB serial or Wi-Fi the primary workflow. PyBLE is BLE-first.
93+
- Do not introduce paid or closed features.
94+
- Do not ship compiled `.mpy` examples; use readable `.py` files.
95+
- Do not commit credentials, signing assets, firmware binaries, IPA files, or
96+
generated build directories.

‎tools/web/src/app/flash/page.tsx‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ export default function FlashPage() {
6464
{ownerConfirmed
6565
? " Firmware v0.6.1 is available for all five board profiles following qualification confirmed by the project owner."
6666
: preview
67-
? ` LOCAL ENGINEERING PREVIEW v${preview.version} — UNQUALIFIED. This is not a public release.`
68-
: publicBeta
69-
? " The current v0.4.2 installer is a hardware-tested firmware beta. Production Chrome erase/install and deliberately interrupted-flash recovery passed on both exact profiles. Complete release qualification is still pending; this is not a qualified release."
70-
: qualifiedPublic
71-
? ` Qualified v${release.version} firmware is available for all ${exactProfileCountLabel(release.profiles.length)} exact release profiles.`
72-
: candidate
73-
? ` This protected, access-controlled v${release.version} release candidate is staged for hardware qualification. Hardware validation is pending on every included profile; the public install action stays unavailable until it passes.`
74-
: " No firmware release is selected for this build; installation remains unavailable."}
67+
? ` LOCAL ENGINEERING PREVIEW v${preview.version} — UNQUALIFIED. This is not a public release.`
68+
: publicBeta
69+
? " The current v0.4.2 installer is a hardware-tested firmware beta. Production Chrome erase/install and deliberately interrupted-flash recovery passed on both exact profiles. Complete release qualification is still pending; this is not a qualified release."
70+
: qualifiedPublic
71+
? ` Qualified v${release.version} firmware is available for all ${exactProfileCountLabel(release.profiles.length)} exact release profiles.`
72+
: candidate
73+
? ` This protected, access-controlled v${release.version} release candidate is staged for hardware qualification. Hardware validation is pending on every included profile; the public install action stays unavailable until it passes.`
74+
: " No firmware release is selected for this build; installation remains unavailable."}
7575
</p>
7676
</PageIntro>
7777

‎tools/web/src/components/flash-status.tsx‎

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ function policyFailure(release: FirmwareReleaseDescriptor | null | undefined) {
160160
body: "No firmware release is selected for this build. Check the current public installer before provisioning.",
161161
};
162162
}
163-
if (release.deployment !== "public" && release.deployment !== "candidate" &&
164-
!isOwnerConfirmedFirmwareRelease(release)) {
163+
if (
164+
release.deployment !== "public" &&
165+
release.deployment !== "candidate" &&
166+
!isOwnerConfirmedFirmwareRelease(release)
167+
) {
165168
if (
166169
release.deployment !== "public-beta" ||
167170
!isExactPublicBetaFirmwareRelease(release)
@@ -491,10 +494,10 @@ function FlashStatusForRelease({
491494
{ownerConfirmed
492495
? "Owner-qualified release"
493496
: candidate
494-
? "Protected release candidate"
495-
: publicBeta
496-
? "Hardware-tested firmware beta"
497-
: "Qualified release"}
497+
? "Protected release candidate"
498+
: publicBeta
499+
? "Hardware-tested firmware beta"
500+
: "Qualified release"}
498501
</h2>
499502
</div>
500503
</div>
@@ -504,14 +507,20 @@ function FlashStatusForRelease({
504507
className="flash-status__message"
505508
>
506509
{ownerConfirmed ? (
507-
<>Firmware v0.6.1 qualification was confirmed by the project owner.
508-
{" "}<a href="/firmware-v0.6.1-owner-confirmation.md">Publication record</a>.
509-
{" "}Select and verify your exact board profile before installation.</>
510-
) : candidate
511-
? "Protected release candidate: hardware validation is pending."
512-
: publicBeta
513-
? "Hardware-tested firmware beta: exact PyBLE v0.4.2 browser installation and interrupted-flash recovery passed on real esp32-4mb and esp32-s3-n16r8 hardware. Complete release qualification is still pending; this is not a qualified release."
514-
: "Select and verify the exact module profile before installation."}
510+
<>
511+
Firmware v0.6.1 qualification was confirmed by the project owner.{" "}
512+
<a href="/firmware-v0.6.1-owner-confirmation.md">
513+
Publication record
514+
</a>
515+
. Select and verify your exact board profile before installation.
516+
</>
517+
) : candidate ? (
518+
"Protected release candidate: hardware validation is pending."
519+
) : publicBeta ? (
520+
"Hardware-tested firmware beta: exact PyBLE v0.4.2 browser installation and interrupted-flash recovery passed on real esp32-4mb and esp32-s3-n16r8 hardware. Complete release qualification is still pending; this is not a qualified release."
521+
) : (
522+
"Select and verify the exact module profile before installation."
523+
)}
515524
</div>
516525

517526
{heterogeneous ? (

‎tools/web/src/lib/firmware-release.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ export type HistoricalFirmwareProfileId =
7474
(typeof historicalFirmwareProfileTable)[number]["id"];
7575
export type PlannedFirmwareProfileId =
7676
(typeof plannedFirmwareProfileTable)[number]["id"];
77-
export type FirmwareDeployment = "public" | "candidate" | "public-beta" | "owner-confirmed";
77+
export type FirmwareDeployment =
78+
"public" | "candidate" | "public-beta" | "owner-confirmed";
7879
export type FirmwareHilStatus = "pending" | "passed";
7980
export type FirmwareProvisioningKind =
8081
"esp-web-serial" | "verified-uf2-bootsel";

0 commit comments

Comments
 (0)