8000 Simplify wording in docs and code comments · Issue #25 · project-minigraf/minigraf-c · GitHub
[go: up one dir, main page]

Skip to content

Simplify wording in docs and code comments #25

Done

Description

@adityamukho

Use direct wording in the passages below. Keep API names, error codes, platform details, and behavior unchanged. This is an editorial review, not an authorship claim. The pinned default-branch audit covers first-party docs and source comments/docstrings. Change generated text at the source and regenerate it.

Snapshot 2d7cc6ed80ee5ab93d0c8ac15dff0e221d0d66cc. Docs: README.md, bench/README.md.

  • README.md:44, “Memory contract” → “What to free and when.”
  • README.md:73, “release its dependents” → “Close the database and release resources held by its cursors, log readers, and prepared queries. Still free each handle.”
  • README.md:127–134, “list replaces the defaults, it does not add to them … [] refuses every keyword … fails the open” → “The list replaces the defaults. Use [] to disallow overrides; a query that includes one then returns API-025. An unrecognized option name or invalid synchronous value makes open return API-017.”
  • README.md:149–150, “They are application code, so …” → “The allow_overrides setting does not restrict these setters. If the query text includes a permitted override, that override takes precedence.”
  • README.md:165–169, “no string ownership crosses the boundary” → “Callbacks pass results and errors through MiniGrafUdfContext; neither side must free a string allocated by the other.”
  • README.md:208–214, “number of values stepped … an aggregate steps … gets nil with none” → “count is the number of values passed to step. A grouped aggregate skips nil inputs and yields nil if no inputs remain. A window passes every value to step and calls finish once per set of peer rows.” Same wording concern in src/lib.rs:1653–1659.
  • README.md:275–286, “rolls back … and finishes it … each call runs whole … writes and begins …” → “Closing the database rolls back any open transaction. Calls through a transaction handle run one at a time. Writes and attempts to begin a new transaction on other threads wait; queries can still read committed data.” Keep the listed INT-001 cases, but split them into separate bullets and say the owning thread is the one that began the transaction.
  • README.md:296–300, “sees the transaction's current write view” → “reads the transaction's earlier assertions and retractions before they commit.”
  • README.md:303–310, “unlimited sentinel … completes empty … dead history” → “There is no way to request an unlimited budget. An unknown target returns a successful empty result even with (0, 0). A target whose references were all retracted can still hit a zero records limit.”
  • README.md:312–316, “Run discovery before staging deletes. Require complete … abandon on exhausted” → “Look up incoming references before deleting anything. If the lookup hits a limit, retry with higher limits or stop. A limit result contains no partial list and leaves the earlier writes staged.”
  • README.md:353–361, “Precedence: reentry … unknown future core outcomes/budgets … stay errors … serialize” → “Check errors in this order: a callback called back into its own transaction (INT-001); the transaction already ended (API-018); invalid arguments (API-017). … Return INT-000 if the core reports a result or limit type this binding does not recognize. Storage and lock errors are reported as errors, not as empty results. Calls on the same handle run one at a time.”
  • README.md:377–381, “handles both lines … fail closed” → “Use the default-branch workflow for releases and retries. It builds and fast-forwards main for 3.x or v2.x for 2.x. It stops if the tag is unsupported or the branch is missing.”
  • README.md:383–389, “checks the locked build graph … consumer-tested … retain their own … consumer contract … checks both slices for presence” → “Before building, verify the dependency and enabled features against Cargo.lock. Build all four archives from the same prepared commit and test each with a C program that uses it. Check both macOS architectures are present, then run the C program on the runner's architecture.” Preserve per-branch checks.
  • README.md:391–395, “Prereleases … are marked as prereleases … below the highest released stable” → “Find alphas and other prereleases by tag on the Releases page. Latest points to the highest stable version, even if you retry an older patch.”
  • README.md:399–407, “immutable Actions evidence … recovery authenticates that evidence … consumer-tests … recovery failures are reported” → “The tag identifies the commit and the original build artifacts, which GitHub Actions keeps for 90 days if retention settings allow. On retry, verify those artifacts, compare uploaded archives byte for byte, and upload only missing archives. A successful retry tests the exact published version with a C program.”
  • README.md:409–416, “for the registry path … records workflow/source/prepared commits, routing … Prepared commits travel …” → “For 2.x, use the crates.io dependency and omit the candidate. The summary names the workflow commit, the commit checked out, and the commit built. The workflow stores the prepared commit in a Git bundle and does not push temporary refs.”
  • bench/README.md:20–23, “foreign result decoding … Callbacks are implemented in this host language” → “Timing includes decoding C results and closing cursors. Each call builds its own set input. The callbacks are written in C.”
  • bench/README.md:25–31, “build provenance … provisional … allowance … manual coverage dispositions … Land this PR … Phase B performs serial workflow dispatch” → “See the benchmark guide for job time limits, build records, and tests that still run by hand. Core CI builds this binding against the measured core commit using a temporary Cargo patch; it leaves the release dependency unchanged. Run the workflows one at a time and verify their uploads and history.” Remove the one-time merge-order note if no longer current.
  • src/lib.rs:91–103, “Every prepared query … emptied when it is closed … Dependents of one handle … None once closed” → “Closing the database clears the prepared-query registry so these queries cannot keep its file open. The registry stores weak references to the database's open handles; None means the database is closed.”
  • src/lib.rs:146, “List value in registry” → “Add a weak reference to value to the registry. Return API-018 if the database is closed.”
  • src/lib.rs:747, 3602 and matching generated include/minigraf.h docs, “Not gated by …” → “allow_overrides does not restrict this setter.” In tests: “These setters still work when query-text overrides are disabled.”
  • src/lib.rs:1487, “aggregate of the count values stepped so far” → “Return the aggregate result for the count values passed to step so far.”
  • src/lib.rs:2189 and matching generated include/minigraf.h docs, “complete-empty” → “a successful lookup with no matches.”
  • consumer-test/run.sh:2–4, “consumer contract” → “C API tests” (the test file may keep its exact name).

Activity

  1. adityamukho commented on Dec 2, 2026

    @adityamukho
    ContributorAuthor

    Main README, benchmark docs, source comments and regenerated header: #26 and #28. Matching v2.x README and test script wording: #27 and #29. All four are merged and passed CI.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0