English fallback
This translation is missing; the canonical English reference follows.
fuzzy1337.page_capture¶
Experimental ADR 0052 LocalPageCaptureProvider connects the actual policy,
governed executor, packaged worker, ScanJob, evidence, captured HTML frontier,
structural requests and durable Security Object Model. Its consumer owns an
existing physical workspace/model, explicitly consented exact URL/IP scope and
distinct capability permission. No automatic CLI/shell/registry registration or
arbitrary-body crawler is introduced.
One job acquires one exact anonymous source GET. It verifies the actual terminal process result and canonical closed record before evidence publication. Both the stdout record and decoded admitted body use unchanged owner manifests/attachments and role-specific bounded Get/Read verification. The existing captured-web consumer returns lexical candidates; these links are never fetched by this plan.
The provider unions every existing source/candidate request collection, preserves unrelated attributes/history and commits source response plus lexical projections in one model Apply/Save before MODEL_DELTA and progress. Full scope snapshot and revision remain pinned to launch. Policy and frontier hashes retain their distinct owning serializers, including valid Unicode metadata with unequal hash strings. After evidence/model composition, fresh consent/expiry and both exact URL/IP memberships are checked immediately before owner Save.
Evidence survives later failure. A pre-Save failure does not save the proposed model; optimistic conflicts are explicit. An ambiguous Save acknowledgement uses owner reopen to report known committed, known uncommitted or uncertain state. Cancellation/event failure after commit retains the persisted model and actual worker success even when no model delta is delivered. Cross-store atomicity and continuous revocation are not claimed.
When the actual owning job event quota is exhausted, its terminal budget failure message remains generic. Reopen the saved model and inspect the retained source observation/evidence; that message alone does not prove the model stayed unchanged.
fuzzy1337.page_capture
¶
Governed closed loopback page acquisition into existing evidence/frontier/model owners.
BrowserPageCaptureLimits
dataclass
¶
Browser-only budgets covering helper readiness, worker, cleanup and source custody.
Source code in fuzzy1337/adapters/page_capture.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
__post_init__() -> None
¶
Require the finite whole-operation margin without expanding native page defaults.
Source code in fuzzy1337/adapters/page_capture.py
209 210 211 212 213 214 215 216 217 218 | |
KnownSyntheticHtmlBody
dataclass
¶
Select a finite reviewed non-secret body; selection supplies no execution authority.
Source code in fuzzy1337/adapters/page_capture.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
__post_init__() -> None
¶
Derive immutable catalog identity without files, arbitrary digests or defaults.
Source code in fuzzy1337/adapters/page_capture.py
150 151 152 153 154 155 156 157 158 159 160 | |
PageCaptureLimits
dataclass
¶
Finite one-request body and whole-operation deadlines, with no expansion knobs.
Source code in fuzzy1337/adapters/page_capture.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
__post_init__() -> None
¶
Reject coercions, huge/nonfinite seconds and inconsistent startup budgets.
Source code in fuzzy1337/adapters/page_capture.py
190 191 192 193 194 195 196 197 198 | |
PageRenderer
¶
Bases: str, Enum
Select one fixed page implementation without arbitrary programs, flags or content.
Source code in fuzzy1337/adapters/page_capture.py
91 92 93 94 95 | |
BoundedPageEvidenceStore
¶
Bases: LocalEvidenceStore
Intercept owner Get's actual parsed reference before its eager Read allocation.
Source code in fuzzy1337/page_capture.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
Read(reference: object) -> bytes
¶
Admit exact stdout/body roles and quotas before unchanged owner integrity checks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reference
|
object
|
Actual parsed owner reference, including Get's internal eager read. |
required |
Returns:
| Type | Description |
|---|---|
bytes
|
Verified bytes after role-specific 98304-byte stdout or 65536-byte body admission. |
Source code in fuzzy1337/page_capture.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
LocalPageCaptureProvider
¶
Acquire one reviewed owned page and commit structural/lexical facts in one model Save.
Source code in fuzzy1337/page_capture.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | |
Descriptor: AdapterDescriptor
property
¶
Return the separate SAFE declaration without acquisition or permission shortcuts.
Returns:
| Type | Description |
|---|---|
AdapterDescriptor
|
Immutable provider/version/capability metadata from the existing adapter contract. |
__init__(workspace_root: Path, source: RequestTemplate, expected_body: KnownSyntheticHtmlBody, scope_id: str, policy: ImpactPolicy, *, limits: PageCaptureLimits | BrowserPageCaptureLimits = PageCaptureLimits(), frontier_limits: CapturedWebLimits = CapturedWebLimits(), clock: Callable[[], datetime] = UtcNow, renderer: PageRenderer = PageRenderer.NATIVE) -> None
¶
Validate only finite typed inputs; preparation performs no network or owner writes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workspace_root
|
Path
|
Existing physical consumer-owned workspace/model/scope/evidence. |
required |
source
|
RequestTemplate
|
Exact anonymous concrete structural GET, with non-secret caller metadata. |
required |
expected_body
|
KnownSyntheticHtmlBody
|
Explicit reviewed non-secret closed catalog selection. |
required |
scope_id
|
str
|
Existing scope ID; exact URL and literal IP must have current consent. |
required |
policy
|
ImpactPolicy
|
Explicit distinct capability permission, independently checked at launch. |
required |
limits
|
PageCaptureLimits | BrowserPageCaptureLimits
|
Selected body/request/provider budgets following ADR 0052. |
PageCaptureLimits()
|
frontier_limits
|
CapturedWebLimits
|
Existing lexical-work/candidate bounds, without traversal. |
CapturedWebLimits()
|
clock
|
Callable[[], datetime]
|
Aware decision clock, reread again immediately before model Save. |
UtcNow
|
renderer
|
PageRenderer
|
Finite native or offline-browser profile, with matching explicit limit type. |
NATIVE
|
Raises:
| Type | Description |
|---|---|
ValueError
|
Source, catalog, nested types or finite budgets are unsupported. |
Source code in fuzzy1337/page_capture.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
CurrentContext() -> PolicyContext
¶
Read actual current scope and require its workspace binding before owner policy.
Returns:
| Type | Description |
|---|---|
PolicyContext
|
Exact current owning scope/policy/source URL and literal-IP destination context. |
Source code in fuzzy1337/page_capture.py
288 289 290 291 292 293 294 295 296 297 298 299 300 | |
Now() -> datetime
¶
Read fresh aware UTC time without retaining input-derived clock failure text.
Returns:
| Type | Description |
|---|---|
datetime
|
Newly read aware clock time normalized to UTC. |
Source code in fuzzy1337/page_capture.py
302 303 304 305 306 307 308 309 310 311 312 | |
Run(context: JobContext) -> None
async
¶
Run one governed worker then retain evidence before one saved model/event transition.
A pre-Save failure retains the prior model. Evidence survives later failure. Save acknowledgement, cancellation and event failure after commit never imply rollback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
JobContext
|
Exact owning job context with matching workspace/provider/scope attribution. |
required |
Raises:
| Type | Description |
|---|---|
JobError
|
Fixed authorization/provider/output/normalization/storage/deadline failure. |
CancelledError
|
Owner cancellation after governed child cleanup. |
Source code in fuzzy1337/page_capture.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | |
Acquire(context: JobContext, *, before_commit: Callable[[], Awaitable[None]] | None = None, publish_progress: bool = True) -> CapturedWebFrontier
async
¶
Execute the pinned one-request plan and validate terminal output before persistence.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
JobContext
|
Current validated owning job, including cancellation and evidence boundaries. |
required |
before_commit
|
Callable[[], Awaitable[None]] | None
|
Optional traversal-owned ordered admission after raw interpretation; model composition and fresh final authority checks follow this await. |
None
|
publish_progress
|
bool
|
Preserve one-page progress by default; traversal owns its counters. |
True
|
Returns:
| Type | Description |
|---|---|
CapturedWebFrontier
|
The retained verified frontier after the owning model Save and event publication. |
Source code in fuzzy1337/page_capture.py
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 | |
VerifyEvidence(record: EvidenceRecord, expected: bytes, provenance: EvidenceProvenance, role: str) -> None
¶
Revalidate supplied/actual full manifests and exact bytes with role-specific Get/Read.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
record
|
EvidenceRecord
|
Exact owning manifest returned from the job attachment boundary. |
required |
expected
|
bytes
|
Already admitted exact worker stdout or decoded closed body. |
required |
provenance
|
EvidenceProvenance
|
Exact prepared collection metadata and actual terminal execution. |
required |
role
|
str
|
Explicit stdout or response-body profile, without arbitrary roles. |
required |
Source code in fuzzy1337/page_capture.py
661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 | |
FinalAuthority(pinned: ScopeSnapshot, pinned_dict: dict[str, object], grant: PolicyGrant, frontier: CapturedWebFrontier, invocation: AdapterInvocation, capability: CapabilityDescriptor) -> None
¶
Reread full scope plus fresh consent after every evidence/model composition boundary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pinned
|
ScopeSnapshot
|
Full immutable scope snapshot used by the actual launch plan. |
required |
pinned_dict
|
dict[str, object]
|
Exact owning ToDict representation retained before grant issuance. |
required |
grant
|
PolicyGrant
|
Original launch grant and policy-owned snapshot/plan digest. |
required |
frontier
|
CapturedWebFrontier
|
Actual body consumer's separately serialized scope digest/revision. |
required |
invocation
|
AdapterInvocation
|
Exact prepared original worker invocation. |
required |
capability
|
CapabilityDescriptor
|
Exact trusted declared synthetic-page capability. |
required |
Source code in fuzzy1337/page_capture.py
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 | |
ReportSaveFailure(previous: ModelState, proposed: ModelState) -> None
¶
Reopen through the owner after an ambiguous acknowledgement without claiming rollback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
previous
|
ModelState
|
Current model snapshot originally used for exact composition. |
required |
proposed
|
ModelState
|
Exact proposed transition whose Save acknowledgement failed. |
required |
Source code in fuzzy1337/page_capture.py
755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | |
ValidateResult(result: object) -> LocalExecutionResult
¶
Refuse copied nested executor wrappers and verify exact ordered terminal stream facts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
object
|
Owning terminal process result with bounded streams and ordered lifecycle events. |
required |
Returns:
| Type | Description |
|---|---|
LocalExecutionResult
|
Original fully revalidated result; nonnormal termination never admits page evidence. |
Source code in fuzzy1337/page_capture.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | |
ADR 0062 adds an internal optional asynchronous commit-order gate and retained frontier return for the bounded owned traversal controller. Defaults preserve one-page acquisition and progress. Final model composition, current authority and canonical Save follow admission to the ordering gate; cancellation retains only actual committed state and original process/evidence facts.
ADR 0090 adds the explicit renderer=PageRenderer.PLAYWRIGHT_OFFLINE keyword with
matching BrowserPageCaptureLimits. The separate SAFE browser capability requires
its own permission and Linux descendant ownership. One native acquisition precedes
offline rendering of only the verified closed body. Success retains source version
1, actual Chromium tool version and http.synthetic-page-browser observations.
Renderer failure preserves an available original verified body but cannot save a
completed page or frontier. Fresh final Save also revalidates the original grant.