Spaces:
Running
Download CONTRACT.md from WideChaos/split-boundary-audit: direct link, hf CLI and curl.
- Browser
- Download file 4.77 kB
-
https://huggingface.co/spaces/WideChaos/split-boundary-audit/resolve/main/CONTRACT.md
- Command line
-
hf download hf://spaces/WideChaos/split-boundary-audit/CONTRACT.md
-
curl -L -o CONTRACT.md https://huggingface.co/spaces/WideChaos/split-boundary-audit/resolve/main/CONTRACT.md
Frozen Split Boundary planner0.2 contract
2026-11-04 before implementation. ExtendacceptedSplitBoundaryAuditwithtrueStaticbrowsergroup-splitplannerandcompatibleauditJSONLexport;sameworkidentitynotnewproject. Preserveoriginal9fileCLIpackageunchangedundercli/,independentmanifest/hashprovenance. Nooriginalbranch/candidatechanges.
InputLF-delimitedJSONL,blanklinescounted/ignored,1..5000validrecords,2MiBrawUTF8max. Exactfields{id,group,label,text};allUnicode-scalarstrings;id/group/labelnonblank<=128UTF16units,textnonblank<=16384units. Uniqueidsrequired,declaredgroupnonempty/mandatory. Missinggroupnotinferredfromlabel/idortext. NativeJSON.parsecannotdetectduplicateobjectkeys,lastkeywinsdocumented. Nomodels/URLfilefollowing. Validatedinputprivateonlylocal;fulltextoutputexplicitlydisclosed.
Threepositiveintegerpercentagestrain/validation/test,sum100;seedunsigned32bitinteger. Default80/10/10,seed17. Eachdeclaredgroupisindivisible. Alsoaddexactrawtext-equalityedgesbetweengroupsandunionconnectedcomponents;entireallocationunitstaystogether. Thisco-locationconstraintpreventsidenticaltextcrosssplit,notclaimsemanticidentity. NoNFC/whitespacemerging. Retainsmixedlabelswithinunit;exacttextassignedmultiplelabelsgetsREVIEWwarning,notrelabelled. Atleast3allocationunitsrequiredfor3nonemptyoutputs;otherwiseblockwithoutpartialassignment. Noautomaticrowsdropping/repairexistingdataset.
UnitrepresentativeUnicodecodepoint-minimumdeclaredgroupid;unitsorderdescrowcount,thenascFNV1a32UTF8(seeddecimal+NUL+unitkey),thenunitkeycodepointorder. Equalprioritiesnotinputorder. Labelsummationcodepointorder. Allgroup/labelmapsMap/Set,id__proto__safe. Greedyonepass(nohiddenoptimizationrestarts):incrementallyassignunittochoiceminimizingglobalobjectiveincrease;exactscoretiesfixedtrain,validation,test. Remainingunitcount==empty_split_count=>restrictchoicestoemptyones,ensuringnonempty. Labelsarenotrequiredineachsplit,zerosandratioroundingexplicitlyreported.
ObjectiveE=sum_s(n_s-Nr_s)^2/[Nmax(1,Nr_s)] + (1/L)sum_l sum_s(n_ls-N_lr_s)^2/[N_lmax(1,N_l*r_s)],whereNrecords,Ldistinctlabels,rpercent/100. Fixedtargetdenominators,nolearnedweights. Deltaevaluationonlychangedcells,fulllosscalculatedindependentlyforthefinalreport;fixedfinitefloat,same-runtimedeterministic(nooptimalityguarantee). Fullyroundedrowcountsneverusedforlabeltargets. Preserveallrowsandinputrecordorderinexport,assignmentinvarianttoinputpermutation. Reportactualandtargetrowcounts,percentagepointdeviation,perclasscounts/targets,groups/mergedunits,allid/group/label/unit/splitassignments,objectiveandconfiguration.
Postplanauditduplicateids/groupcrossing/exacttextcrossingmust0;normalizedNFC+whitespacecrosssplitwithdistinctexacttextsREVIEW-only,notreassign/claimsemanticduplicates. MatchnormalizationmembershipwithoriginalPythonauditthroughindependentactualJSONLexportread. Additionalexacttextlabelconflictwarningdistinctfromsplitfailure. CLEARmeansboundedchecksnotgeneralcontaminationproof. Rowsnotdroppedtoimproveratios.
Browser:labelledJSONLtextarea,3ratioinputandseed,Planbutton,plainerrors/targetsvsactual/allclasscounts/linkedgroupunitdisplayandnormalizationwarnings. Exportplanreport(nofulltexts)andassignedJSONL(fullsources,originalCLIprojectionexact{id,split,group,text};labelssavedinplanreport). Input/configeditclearsoldresults/Bloblinks,revokereplacedURLs;asyncSHA256oftheexactrawinputguardedbyrevisionticket. Build/PlanhasnonetworkinitialfixedsampleGETonly,noqueryURL/storage/CDN/telemetry. AllDOMtextContentsafe. Desktopand390pxactualUI+nativeBlobdownloadandPythonCLIrealreadrequired.
Tests:handunit/scorefixture,independentPythonobjective/deltaforadditionalcases,numeroussmallgroupassignmentsverifyconservation/constraints/permutation/seed/equalitybridges/rareclasses/nonempty,allscalarJSONLcaps/errors. ComparecompletedassignedJSONLwithread-onlyoriginalCLI(noinfrozencandidatepyc). Observedgreedyvsbruteforceoptimumcounterexamplemustretainifdiscovered,notchangemethodafterseeingit. Ownsynthetic36record/12declaredgroupssamplefreezebeforeimpl,labelsinthreeclasses,noexternaldatasetclaims. Fullsampleassignmentaudit/warningcountsretained,notperformancebenchmark. IndependenttotalreviewprecisioncandidatebeforelaterdailyHFrelease,todaynopublish.
Pre-freeze usability addition: run_plan.mjs is a standard-library Node CLI adapter to the exact same planning function, with fatal UTF8 decoding (BOM preserved), explicit file input, fresh output directory and report/assignedJSONL writes. It does not change allocation or schema, and its outputs are compared with actual browser downloads. Exit0completeincludingREVIEW;exit2failure,filesystempartialoutputnotvalid. BrowsersecurecontextfailurehasreadableHTTPS/localhostmessage. Initialassetloadpreserveseditsmadebeforefetchcompletes.