Repository navigation
Span-level human score: Flag and FlagReason on Score (offsets only) - #15
Merged
Merged
Conversation
4 tasks
The open half of the human-score work: the wire shape and the port
contract. The stylometric detector, its measurements and the CLI opt-in
are hosted-only and live in the private Ghostwritin/ghostwritin-cloud
repository; the open build still ships NoHumanScore.
- Score gains #[serde(default)] flags: Vec<Flag>. A Flag is
{ start, end, reason }: byte offsets on char boundaries into the scored
text (score_before indexes the request text, score_after the rewrite).
Flags may overlap or nest and carry no words.
- FlagReason (non_exhaustive): stock_phrase, uniform_rhythm.
- The HumanScore port docs say an implementation stores and logs nothing
and that flags are offsets, never text.
- The wire-shape test covers flags and a score from before they existed.
Co-authored-by: Colonizer Settlers <331648616+colonizer-settlers@users.noreply.github.com>
ParallelEntrepreneur
force-pushed
the
colonizer/issue-4-c01872c5
branch
from
October 10, 2026 09:42
d4bcd9f to
bb95b55
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4. Split: this PR carries only the open-core half of the human-score work: the wire shape and the port contract. The stylometric detector, its measurements and the CLI opt-in are hosted-only. They moved to the private hosted repository (Ghostwritin/ghostwritin-cloud#2), which depends on this PR's head commit through an exact git pin. The branch was rebuilt on current
main.What changed (open)
Scoregains#[serde(default)] flags: Vec<Flag>.Flagis{ start, end, reason }: byte offsets on char boundaries into the scored text.score_beforeindexes the request text andscore_afterindexes the rewrite.FlagReason(#[non_exhaustive]):stock_phrase,uniform_rhythm.HumanScoreport docs: an implementation stores and logs nothing, and its flags are offsets, never text.The open API, Worker and CLI still ship
NoHumanScore, so both scores arenull, and the README status line is unchanged.Moved to the private repository
crates/ghostwritin-detectcrate (theStylometricheuristic, theevaluateexample and its tests).--human-scoreflag, now aghostwritin-cloudbinary there.Verification (local; Actions is billing-blocked)
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspaceRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspacecargo build --target wasm32-unknown-unknown -p ghostwritin-worker