agentleFS
advenimusadvenimus/conduit-desktop/.claude/skills/verify-ownership/SKILL.md

verify-ownership

Skill19 starsChanged 50 days agoApache-2.0View on GitHub

Run only the live vault ownership suite (owner and grace, grace ending and Make my own copy, release and hand-over, release surviving a background re-acquire, owner tag signed out and offline, the account device cap, the minimum app version, the cloud backup plan gate) against the real Conduit app and a local Appwrite. Use after changing electron/services/vault-session/ (owner-tag, own-copy tickets, the open gate, the session client), src/components/sync/ ownership dialogs and banners, cloud backup limits, or the plan enforcement rules in appwrite/src/api/ (rpc/sessions.ts, storage.ts), or when asked to verify ownership or plan limits live. Fully isolated; takes about 3 minutes.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the failing scenario's steps, error, screenshot and <device>.main.log.

    line 63
  2. Very specific:

    Only the local stack on localhost.

    line 72
  3. Very specific:

    Never run docker compose down -v on the local stack or delete its env file unless the user asks.

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/verify-ownership: vault ownership and plan limits suite

Runs npm run verify:ownership (node scripts/verify/run.mjs ownership). Real Electron devices of two accounts share one "cloud" folder, sign in as generated test users on a local Appwrite, and are driven like a user. The spec under test is docs/PLAN_ENFORCEMENT.md (sections 1, 3, 4 and 7.3); the harness reference is scripts/verify/README.md. Every suite at once is the verify skill; the device-lease basics (take-over, plan changes, owner claims) are the verify-sync skill.

Needs

The plan enforcement rules in the deployed api function (appwrite/src/api/rpc/sessions.ts for ownership, grace, device cap and minimum version; appwrite/src/api/storage.ts for the backup gate). The harness redeploys appwrite/ from the checkout under test whenever it changed, so run it from the checkout you want to test. Everything else is as in verify-sync (Docker and the local Appwrite stack from npm run appwrite:setup).

What it proves

Each scenario uses its own devices (o1a, o1b, ...) and its own <cloud>/o<n>/Vault.conduit. Clocks move by backdating personal_vault_owners, personal_vault_guest_grace and lease rows (ctx.shiftBack).

ScenarioIn plain words
owner-and-graceThe account that creates a vault owns it (personal_vault_owners, owner tag in the file). Another account opens it at once with "This vault belongs to another Conduit account. You can use it until ..." and its four buttons; the owner sees "Another Conduit account is using this vault until ...".
grace-endsWith the grace clocks moved back 15 days the guest's open vault locks ("... your 14 days of access ended.") with no [Use here instead]; unlocking again shows "This vault belongs to another account"; [Make my own copy] saves next to the original ("Your copy is ready."), the copy opens and is owned by the guest, and the owner still opens the original.
release-hand-overThe owner (moved past the 7-day cooldown) releases in Settings > Sync ("Vault released."); the owner row is empty with released_by set and the file carries {"a": null}; the next account to open it owns it; the ex-owner may use it during grace and afterwards sees "You released this vault and another account now owns it."
release-survives-reacquireAfter a release on one of two devices of the owner, the other device's lease is expired by hand; its background re-acquire (p_claim false) leaves the vault unowned.
signed-out-tagA signed-out device of another account gets "Sign in to open this vault"; the owner device, signed out, still opens (its cached owner check).
offline-ownerWith the backend cut, the owner opens its vault; another account's device gets "Connect to the internet so Conduit can check who owns this vault".
device-capWith five other devices holding leases, unlocking shows "Too many devices" naming the least recently used one; [Use here instead] opens and displaces it with device_cap.
update-requiredWith min_app_version.desktop at 99.0.0 the open vault locks ("Update Conduit to keep using this vault.") and unlocking shows "Update required" with the version. The setting is put back to 0.0.0 at the end of the scenario and at cleanup.
cloud-backup-freeA Free account's direct upload to the vaults bucket is refused by the server; after a downgrade [Back Up Now] leaves "Cloud backup needs Pro or Team. Your earlier backups are still here." with [Upgrade].

Run it

npm run verify:ownership
node scripts/verify/run.mjs ownership --only grace-ends            # one scenario
node scripts/verify/run.mjs ownership --only device-cap --keep     # keep /tmp/cv-<id> to inspect

Exit code 0 means all passed including cleanup, 1 means a failure, 2 means bad arguments. Test windows appear on screen: leave them alone. About 164 s of scenarios plus about 10 s of setup; use a 10 minute timeout.

Read the results

As in verify-sync: .verify/<runId>/results.json, shots/, logs/<device>.main.log. Owner rows (from the repo root, read-only, as the service):

node --input-type=module -e "import {rows} from './scripts/verify/lib/backend.mjs'; console.table(await rows('personal_vault_owners', {}, {columns: 'vault_key, owner_id, owner_since, grace_started_at, released_by'}))"

Or open table personal_vault_owners in the console (http://localhost:8085, login in conduit-dev.env).

When something fails

  1. Read the failing scenario's steps, error, screenshot and <device>.main.log. Decide: app bug, harness bug, an old api deployment, or environment.
  2. Re-run only it with --only.
  3. Fix the root cause and add a unit test where the code allows. Never weaken an assertion, skip a scenario or raise a timeout without a measured reason. If a check disagrees with docs/PLAN_ENFORCEMENT.md, say so and cite the section.

Safety rules

  • Only the local stack on localhost; never production Appwrite (appwrite.cloudwise.ca) or any cloud project; never CONDUIT_ENV=production.
  • update-required changes a global setting of the local stack for a minute; do not run it beside another run that opens vaults.
  • Never run docker compose down -v on the local stack or delete its env file unless the user asks; never print the API key, the service secret or tokens.

Report back

One line with the result and time, then passed / total, then each failure with its root cause and the fix or open question, and the run folder. Quote the RESULT: line as printed; never claim a pass you did not run.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.