Skip to content

docs(architecture): correct the create_lock signature, budget and coverage claims - #35

Open
jdjioe5-cpu wants to merge 1 commit into
Kinlock-Org:mainfrom
jdjioe5-cpu:docs/reconcile-architecture-and-coverage
Open

jdjioe5-cpu wants to merge 1 commit into
Kinlock-Org:mainfrom
jdjioe5-cpu:docs/reconcile-architecture-and-coverage

Conversation

@jdjioe5-cpu

Copy link
Copy Markdown

Summary

Closes #30

Reconciles the three doc statements that contradicted code reality, ensuring design specifications truthfully mirror actual implementation without deleting unbuilt requirements:

  1. create_lock signature: Updated in `docs/ARCHITECTURE.md` vault entry table to include `sender` and the `TrancheInput` type name: `create_lock(sender, token, payee_id, tranches: Vec, ref_hash, expires_at)`, matching `contracts/kinlock/src/lib.rs:103`.
  2. Budget tests: Reworded budget assertion statements in `docs/ARCHITECTURE.md` (table and bullets) and `docs/ARCHITECTURE_ESSENTIALS.md` to reflect actual status as a planned target (`M1-16`, blocked by `M1-30`; not yet implemented) rather than claiming active enforcement in CI.
  3. Property coverage: Rephrased `README.md:8` to truthfully state what `check_invariants()` in `contracts/kinlock/tests/properties.rs` directly asserts today (invariants 1–4, 7, and 9) while explicitly pointing at `M1-38` (contracts Property harness: assert invariants 5, 6 and 8 directly, not only through the operation gates #27) for direct assertions of invariants 5, 6, and 8.
  4. Canonical sync & roadmap: Canonical documents edited in `Kinlock-Org/.github` (PR docs(architecture): reconcile create_lock signature and budget statements .github#35) and mirrored to repo copies via `scripts/sync-docs.sh`. Updated `ROADMAP.md` Changelog and Last updated (noting this is the contracts half of org rows F-18/F-19).

Hard rules / invariants touched

  • AGENTS.md §1 (code is source of truth for signatures; doc conflicts surfaced and reworded truthfully)
  • AGENTS.md §3 rule 7 (honest statements, no overclaim of test coverage)
  • AGENTS.md §6 (commands actually executed with real outputs recorded)
  • AGENTS.md §12 (ROADMAP.md Changelog and Last updated maintained)
  • Invariants: 1, 2, 3, 4, 5, 6, 7, 8, 9 (coverage boundary explicitly clarified)

Scope compliance

  • `README.md` (line 8 property claim qualified)
  • `ROADMAP.md` (Changelog entry and Last updated)
  • `docs/ARCHITECTURE.md` (synced from canonical)
  • `docs/ARCHITECTURE_ESSENTIALS.md` (synced from canonical)
  • Zero changes to contract code (`contracts/kinlock/src/**`), bindings, deployments, toolchain or CI workflows.

Verify before open PR output

```bash
$ & "C:\Program Files\Git\bin\bash.exe" ../.github/scripts/sync-docs.sh .
(exit code: 0)

$ & "C:\Program Files\Git\bin\bash.exe" ../.github/scripts/sync-docs.sh --check .
(exit code: 0)
```

Note on `cargo test --workspace`:
Executed in local Windows environment. The test compilation stopped at `upgrade_tests.rs` due to missing target wasm binary (`../../target/wasm32v1-none/release/kinlock.wasm`, requiring separate `stellar contract build`) and Windows-specific linker symbol export ceiling (`ld.lld: error: too many exported symbols (got 73962, max 65535)`). Per issue instructions: "No code change, so no test. Paste scripts/sync-docs.sh --check . output in the PR. ... plus what you could not run and why."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Three doc statements contradict the code: create_lock signature, budget tests, property coverage

2 participants