Skip to content

Commit e0f3220

Browse files
authored
docs: add profile change checklist to AGENTS.md (#7598)
1 parent 4970291 commit e0f3220

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@ npx cucumber-js -p home -p ch -p datastore
9292
npx cucumber-js -p home -p mld -p mmap
9393
```
9494

95+
**IMPORTANT: Profile changes MUST follow this checklist:**
96+
97+
1. **Cucumber tests**: Every change to a profile (`.lua` files in `profiles/`) must be accompanied by a corresponding cucumber test in `features/` that validates the new or changed behavior.
98+
- Run the relevant cucumber tests before committing profile changes:
99+
```bash
100+
OSRM_BUILD_DIR=build npx cucumber-js -p home -p mld -p mmap features/<profile>/<feature>.feature
101+
```
102+
The test cache is keyed by a content hash of all profiles, binaries, and the feature file, so profile changes automatically invalidate the cache. Old cache directories can optionally be cleaned up with `rm -rf test/cache`.
103+
- Run the whole `.feature` file (not just the new scenario) to verify no regressions.
104+
- Use the existing test patterns: `routability should be` tables where any column header starting with `forw`, `backw`, or `bothw` (including `*_rate` variants) is an expectation column (not an OSM tag). Headers matching `node/<tag>` apply to node tags. All other columns become OSM way tags.
105+
- Do NOT add `@todo` to new scenarios — verify the expected behavior matches actual routing output.
106+
107+
2. **taginfo.json**: If modifying tag handling (adding, removing, or changing how OSM tags are parsed), update `taginfo.json` with any new OSM tags that are now recognized or any tags whose semantics have changed.
108+
109+
3. **OSM Wiki adherence**: Verify that the behavior matches [OSM tagging conventions](https://wiki.openstreetmap.org/wiki/Key:access):
110+
- Mode-specific tags (e.g. `bicycle=yes`) override vehicle-level restrictions (e.g. `vehicle=no`)
111+
- Directional suffixes (`:forward`/`:backward`) scope a tag to a specific travel direction
112+
- The access tag hierarchy is: mode-specific > vehicle-level > general access
113+
- When in doubt, consult the relevant OSM wiki pages for the tags being changed
114+
95115

96116
## Python Bindings
97117

0 commit comments

Comments
 (0)