Skip to content

Commit 61c9d38

Browse files
committed
[refactor] harden app version identity contract
Signed-off-by: Viwat Vchirawongkwin <viwat.v@chula.ac.th>
1 parent 0acde2f commit 61c9d38

2 files changed

Lines changed: 30 additions & 9 deletions

File tree

‎app/test/unit/app_version_contract_test.dart‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,25 @@ void main() {
3737
reason: 'PBLE/1 HELLO must match the package base version exactly',
3838
);
3939
});
40+
41+
test('production PBLE/1 HELLO consumes the shared app identity', () {
42+
final String mainSource = File(
43+
'${appPackageRoot().path}/lib/main.dart',
44+
).readAsStringSync();
45+
46+
expect(
47+
mainSource,
48+
matches(
49+
RegExp(
50+
r'PbleConnectionManager\.production\('
51+
r'\s*appName:\s*kAppName,'
52+
r'\s*appVersion:\s*kAppVersion,'
53+
r'\s*\)',
54+
),
55+
),
56+
reason:
57+
'the production manager must not replace either shared constant '
58+
'with an independently versioned literal',
59+
);
60+
});
4061
}

‎docs/decisions/0044-start-app-v020-beta-train-at-build-5.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
## Context
1010

11-
The installed app identity remains `0.1.0+4`, but build 4 is a retained
12-
TestFlight handoff bound to an earlier source commit. Since that handoff, the
13-
app source has gained a coherent set of compatible beta features: connected
14-
board identity, the numbered and adjustable rich editor, SHA-pinned GitHub
15-
import, the editable official examples-repository default with branch-only
16-
discovery, session-bound visible-file multi-delete, and a one-row responsive
17-
Files toolbar.
11+
Before this decision, the installed app identity was `0.1.0+4`; build 4 remains
12+
a retained TestFlight handoff bound to an earlier source commit. Since that
13+
handoff, the app source has gained a coherent set of compatible beta features:
14+
connected board identity, the numbered and adjustable rich editor, SHA-pinned
15+
GitHub import, the editable official examples-repository default with
16+
branch-only discovery, session-bound visible-file multi-delete, and a one-row
17+
responsive Files toolbar.
1818

1919
Reinstalling a different source state under the same version and build works
2020
for local development, but it makes About, screenshots, HIL evidence, and
@@ -70,8 +70,8 @@ previously assigned a numbered milestone to the current Unreleased app work.
7070
moving branch tip.
7171

7272
8. **Keep delivery test-first and local until accepted.** The synchronization
73-
test lands red before the version implementation. The exact release build is
74-
installed and physically reviewed on iPad before any pull request or push
73+
test lands red before the version implementation. The exact candidate build
74+
is installed and physically reviewed on iPad before any pull request or push
7575
for this combined feature branch.
7676

7777
## Consequences

0 commit comments

Comments
 (0)