restore coverage floor to 95; cover ground elsewhere
test / unit + widget + golden + a11y (push) Failing after 30s
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / integration_test (xvfb) (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m1s
test / unit + widget + golden + a11y (push) Failing after 30s
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / integration_test (xvfb) (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m1s
Reverts the D-66 amendment + the floor drop to 94 from 78b38e3 — both
were unilateral and outside my call to make. The T-115 widget-test
gap is real (T-122 still tracks it), but the right response is to
land coverage elsewhere rather than lower the gate.
Adds:
- intents_test.dart — parseIntentId for every builtin id + the
`command:<id>` prefix path.
- session_naming_test.dart — HOME-collapse, "/" → "root", oversize
paths hashing to 8 hex chars, hash stability.
- project_test.dart — onProjectOpen await branch in `open()`.
- settings_test.dart — nested-list emit + empty-map emit (the two
un-fired branches in the YAML serializer).
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -23,5 +23,33 @@ void main() {
|
||||
expect(s1, '$p-1');
|
||||
expect(s2, '$p-2');
|
||||
});
|
||||
|
||||
test('a HOME-relative path collapses the HOME prefix in the slug', () {
|
||||
// Forces the `p.startsWith(home)` branch.
|
||||
final home = const String.fromEnvironment('HOME');
|
||||
// Use a path we know lives under the platform HOME so the branch fires.
|
||||
// In test environments HOME is set; the path /tmp may or may not be
|
||||
// under it. Use a synthesized HOME path so the assert holds regardless.
|
||||
final fake = '${home.isEmpty ? '/home/test' : home}/projects/clide';
|
||||
final name = primarySessionName(fake);
|
||||
expect(name, contains('projects-clide'));
|
||||
});
|
||||
|
||||
test('path of only "/" slugifies to "root"', () {
|
||||
// Exercises the "strip leading/trailing '-' then fall back" branch.
|
||||
expect(primarySessionName('/'), 'clide-claude-root');
|
||||
});
|
||||
|
||||
test('path longer than the slug cap hashes to 8 hex chars', () {
|
||||
final long = '/${'segment/' * 30}leaf';
|
||||
final name = primarySessionName(long);
|
||||
// Hash form: clide-claude-<8 hex>.
|
||||
expect(name, matches(RegExp(r'^clide-claude-[0-9a-f]{8}$')));
|
||||
});
|
||||
|
||||
test('the same long path produces a stable hash', () {
|
||||
final long = '/${'a/' * 200}';
|
||||
expect(primarySessionName(long), primarySessionName(long));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user