You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add config file option to control whether underscores in field keys are replaced with hyphens in formatted output.
Configuration:
- Set `prettify-field-keys = false` to preserve original underscores
- Set `prettify-field-keys = true` for hyphen replacement (default)
- Config-only option (no CLI flags)
Behavior:
- Default (`true`) preserves current behavior for backward compatibility
- When disabled, field keys like `request_id` display as `request_id`
- When enabled, field keys like `request_id` display as `request-id`
- Applies to all key segments including nested/flattened keys
- `--raw-fields` flag takes precedence when active
Co-authored-by: Claude Sonnet 4.5 <[email protected]>
- Step 2 of version check now includes git fetch -t to ensure latest tags
13
+
- Date: 2026-02-04
8
14
-->
9
15
10
16
# hl (High-performance Log viewer) Constitution
@@ -32,6 +38,29 @@ Comprehensive error handling with graceful degradation. All input validated; mal
32
38
<!-- TDD mandatory; no exceptions for performance-critical code -->
33
39
Unit tests for algorithms and parsers. Integration tests for end-to-end CLI workflows. Property-based tests for streaming behavior. Performance benchmarks tracked and enforced. All tests must pass before merging. Coverage must not decrease: patches must maintain or improve the project's average code coverage.
34
40
41
+
**Schema Validation Requirements:**
42
+
When modifying configuration file structure (`src/settings.rs`, `etc/defaults/config.toml`) or theme configuration files, the corresponding JSON schema files (`schema/json/config.schema.json`, `schema/json/theme.schema.*.json`) MUST be updated to reflect the changes.
43
+
44
+
**Schema Build Workflow:**
45
+
After updating schema files, the following workflow MUST be followed:
46
+
1. Run `cargo build` to automatically update embedded schema references
47
+
2. Only after build completes successfully, run `just ci` for validation
48
+
3. This order is mandatory because the build process updates schema references that CI validates
49
+
50
+
This ensures:
51
+
- Configuration validation tooling remains accurate
52
+
- IDE autocomplete and validation work correctly
53
+
- Documentation stays synchronized with implementation
54
+
- Embedded schema references are current before validation
55
+
56
+
**Coverage Validation Requirements:**
57
+
After implementing any new feature, run `just uncovered` to identify changed lines lacking test coverage. If uncovered lines appear:
58
+
- MUST add tests to cover them unless they require environmental interaction (file I/O, network, OS-specific behavior)
59
+
- Document why coverage cannot be added if environmental interaction prevents testing
60
+
- Aim to maintain or improve overall project coverage percentage
61
+
62
+
This ensures new features are properly tested and maintains the high-quality bar established by existing code.
63
+
35
64
### VI. Specification & Cross-Reference Integrity
36
65
<!-- Maintain referential integrity across all documentation and code -->
37
66
**Avoid renumbering identifiers whenever possible.** Prefer adding new requirements at the end of sections or using sub-identifiers (e.g., FR-030c, FR-030d) to insert requirements without disrupting existing numbering.
@@ -73,11 +102,83 @@ Tests MUST use external data files instead of inline multiline string literals f
73
102
## Development Workflow & Quality Gates
74
103
75
104
**Code Review**: All PRs require at least one review. Performance-sensitive changes require benchmark verification.
105
+
76
106
**Testing Gates**: All tests must pass (`cargo test`). Benchmarks must not regress (`cargo bench`). Clippy warnings must be resolved.
107
+
77
108
**Documentation**: Features documented before or concurrent with implementation. Breaking changes documented in CHANGELOG.
109
+
78
110
**Performance**: New features benchmarked. Regressions >5% must be justified and documented.
111
+
79
112
**Backwards Compatibility**: Maintained across minor versions. Deprecation period required before removing features.
80
113
114
+
**Version Check Before Implementation**: Before starting feature implementation, ensure version is properly bumped:
115
+
116
+
1. Run `just version` to get current version (e.g., `0.36.0-alpha.5`)
117
+
2. Run `git fetch -t && just previous-tag` to get latest tags and previous release tag (e.g., `v0.35.3`)
118
+
3. Compare the major.minor versions:
119
+
- Extract major.minor from current version (e.g., `0.36`)
- Source code references (file names, line numbers)
162
+
- Test statistics ("1464 tests passing")
163
+
- CI validation status ("Full CI validation passed")
164
+
- Internal refactoring unless it affects users
165
+
- Code quality metrics
166
+
167
+
**Exception**: Internal changes with no user-visible impact may include brief technical context, but still avoid source code specifics. Focus on "what changed" in system behavior, not "how it was implemented."
168
+
169
+
**Examples**:
170
+
- ✅ Good: `feat(config): add prettify-field-keys option to control key prettification`
171
+
- ✅ Good: `fix(parser): handle timestamps with microsecond precision correctly`
172
+
- ❌ Bad: `feat(formatting): implement prettify_field_keys in RecordFormatter struct`
173
+
- ❌ Bad: `fix: update formatting.rs line 1211 to check prettify flag. All 1464 tests pass`
- All code passing quality gates before entering version control
178
+
- Clear commit history enabling easy navigation and rollback
179
+
- Prevention of broken commits that fail CI pipelines
180
+
- Release notes are immediately useful to end users
181
+
81
182
## Governance
82
183
83
184
This constitution supersedes all other practices and informal conventions. All PRs and code reviews must verify compliance with these principles. Complexity introduced must be justified against the principles and documented.
@@ -90,4 +191,4 @@ This constitution supersedes all other practices and informal conventions. All P
0 commit comments