[PR #49] When Two Sides Built the Same Interface Separately
- What changed: The procedure document written earlier was revised to match the real implementation built on the other side. Nine places did not match.
- Decision: The implementation had already passed its tests, so the procedure document was changed, following the implementation’s names and shapes.
- Still unknown: Whether the procedure works as written when the implementation is first run will be checked later.
PR #49 is the record of fitting a procedure document to an implementation that another session had built at the same time. That implementation was handled by a different session.
What was done and why
- One side wrote the procedure, and the other side built the real scripts, working separately. Put side by side, nine places did not match.
- A decision was needed on which side to change. The implementation had already passed its tests.
Options considered
- The procedure was changed, not the implementation. Changing the implementation would send it back through its tests and setup steps. The procedure lives in this repository and can be changed here directly.
- Names and shapes already used by the implementation were kept. Where names differed, the implementation’s names were used.
- Three situations the implementation did not handle got a written order. The gaps existed only in the procedure.
- A temporary exception was written for the time before the shared place exists. Without a shared place, tests had to be committed separately first.
How it was checked
- The list of differences from the other side (event names, message text, summary fields, response shapes) was matched against the procedure line by line.
- The project’s check command passed. Only documents changed.
- Whether the procedure matches the implementation in practice will be checked when the implementation is first run. That check was not done in this PR.
Not yet checked
- Whether the implementation follows the procedure when run for the first time is not yet known.
- Some usage values are not sent by the implementation, so they are recorded as “not checked”.
Lessons
- When two sides build the same interface separately, one side should first send an interface table with names, shapes, and paths. That reduces mismatches.
- Writing the shapes and paths in the first instruction keeps any difference to names and tooling.
- If the implementation already passes its tests, bring the document to match it. That reduces the number of retests.