oficina / equipo Public
Native sharing and recent screenshots
Implemented the approved plan d6839992 on native/share, based on main 602b91fe. No server or runner protocol change. No merge or release.
Result
The iPhone share extension opens a compose sheet for images, supported files, URLs and text. It shows the receiving team/person, allowed projects, attachment thumbnails, per-item upload progress/retry/remove, Cancel and Send. URLs are editable text and are never fetched. Mac registers the equivalent Send to Equipo Service in the existing application.
The extension uses an independent Swift package without the host's sign-in UI, events, push, Activity or updater dependencies. The host and extension share the attachment converter and keychain store. Original files are copied in 64 KiB chunks, with scoped access before metadata. ImageIO reads file URLs and thumbnails to 2560 pixels off the main actor. Providers and uploads are processed serially; prepared files stay on disk. Limits remain five attachments, 128 MiB source disk input, 10 MiB prepared output each, and 16 KiB message text.
The host records its active share selection through the existing lifetime-guarded keychain commit. The extension checks origin, person, generation, credential expiry and the pinned shared Oficina identity/session records before every request and after every response. The session must name the current valid grant and match the saved session hash. Sign-out/account changes cancel work and clear previews. No credential is written outside the keychain.
The final message body and idempotency key are journaled before POST /messages. Retries and a restarted extension reuse that immutable request. The journal is partitioned by recipient, file-locked, protected and backup-excluded, with a 24-hour lifetime. Late acknowledgements cannot clear a newer request. An uncertain send remains visible for explicit retry; expired journals ask the person to check the conversation. Uploads use ephemeral sessions, refuse redirects and bound responses to 128 KiB.
The first plus tap offers the reviewed explanation. Only Choose screenshots requests Photos read/write access. Existing limited access is respected; no library prompt occurs on composer entry or merely opening the explanation. Only accessible screenshots within five minutes are eligible. Dismissal, expiry, backgrounding and account changes clear the offer. A chip never uploads itself.
Signing API write ledger
| Resource type | Resource ID | Purpose | | --- | --- | --- | | bundleIds | 5A2VW485ZH | works.oficina.equipo.share | | profiles | SM8YDSA5C4 | Oficina Equipo Share iOS App Store 2026-11-26 |
These are the only API writes. No capability, App Group or certificate was created. The profile permits the existing app and Oficina ID keychain groups. Profile contents and key material stay outside the repository. No portal action by Paul was needed. The external agent-tools/equipo-tf/testflight.sh now passes OFICINASHAREPROVISIONING_PROFILE and maps the share extension during export. No archive, upload, notarization or release was run.
All eleven native.share/native.screenshot strings use Luna's exact final verdict, marked Luna, 2026-11-26. chat.connections.dismiss is imported byte-identically under parity. There are no outstanding copy questions.
Test-first evidence and fixes found
- Initial core tests failed for missing implementations (initial-red.log).
swift test --package-path native/share --jobs 4: 17 tests passed, including the real loopback HTTP upload-to-message fixture, bearer/no-cookie checks, response bounds, redirects, auth binding, journal concurrency and retry idempotency. This package had one unfiltered local run; subsequent runs were focused.- The main app's focused attachment, host-lifetime and Services tests passed 18 tests. These retain the large HEIC/WebP, orientation, metadata, white backing, scoped access, cancellation and upload-generation regressions.
- The pinned identity test first accepted a replaced grant and a malformed token. It now rejects both; all ten pinned-record cases pass. Both guards were mutated.
- Concurrent journal writers first exposed a clock-order race: a caller with an earlier sampled clock discarded the first writer's pending request. Future timestamps now preserve it. Retries cannot extend its original lifetime.
- The real system share sheet exposed lost filenames and an archived NSString plain-text representation. Staging now preserves names. Bounded string decoding supports UTF-8, BOM-tagged UTF-16 and secure NSString archives only; other archived classes are refused. The archive test failed before the fix and passes after it.
- The first Photos capture exposed observer registration before permission. It is now gated on existing access. A notification prompt caused by the fixture's live app model was removed by entering the fixture directly.
xcodebuild ... -scheme ShareUI -jobs 4 -parallel-testing-enabled NOwith ad-hoc simulator signing and the real keychain groups: the real share test passes for compose, signed-out and 8064×6048 HEIC (ShareUI8.xcresult). It asserts the original filename, exact imported sentence and enabled Send. The permission/chip test passes (ShareUI5.xcresult), including no early prompt, the explicit system prompt and dismissal. Earlier failures and the system activity selector correction are retained in the validation logs.- The iPhone app/extension and Mac app build. Mac bundling used the pinned shared bundler with a scratch wrapper adding --jobs 4, then configure-services.py added NSServices and re-signed the bundle. The Service entry-point test receives a web URL as editable text and does not send it automatically.
check-share.py,check-sign-in-lifetime.py,check-strings.py, parity (335 web strings) andgit diff --checkpass. The packaging guard also runs in Linux CI through make runner-dead-references. The complete local gate script was not run, following the controller's later machine rule. Linux CI is the final gate.
Every heavy local job was preceded by load/swap/job checks, run alone with four workers, and bounded. Work paused while load exceeded 20. No shared cache was cleared. Only the existing generic simulator was reused; none was created or booted by this task.
Memory and remaining device checks
The standalone probe generated an 8064×6048 HEIC in a separate process, then prepared five serially while retaining file URLs. Final output is 1920×2560 JPEG; peak RSS was 92,061,696 bytes (87.8 MiB). The opaque-image canvas optimization did not materially lower the peak. The 80 MiB plan target is not met.
The actual simulator extension prepared that HEIC through the system share sheet: peak sampled physical footprint was 89,606,640 bytes (85.5 MiB), below 120 MiB. Simulator peak RSS was 467,845,120 bytes, including mapped framework pages; this is not interchangeable with physical footprint or a device jetsam limit. The memory JSON contains only process measurements. No source content or credential is logged.
Paul's physical iPhone is unavailable in devicectl. Signed-device keychain/memory validation and a real newly taken screenshot under limited/full Photos access remain pending. The chip screenshot is a visual fixture, with eligibility covered by policy tests and the actual permission prompt covered by the simulator test. These limits were sent to the controller; simulator proof does not replace them.
Mac screenshot capture is also blocked in this session: System Events says “osascript is not allowed assistive access”, and screencapture cannot create an image from the display. No privacy permission was changed or bypassed. The Mac Service is built, registered and tested; its requested menu screenshot remains pending. Fixture processes started for that attempt were terminated.
Screenshots and artifacts
Under polish-audit/equipo-daily-driver/site/build/slice7/:
- iphone-share-compose.png
- iphone-share-signed-out.png
- iphone-share-large.png
- iphone-screenshot-chip.png
- iphone-screenshot-permission.png
- simulator-large-heic-memory.json
These are captures from the branch's simulator build, with a disposable keychain recipient and fake transport. No real message was sent. The simulator was already booted, so cleanup terminates only this task's fixture and removes its disposable account/files, preserving other sessions' simulator work.
Mutations
Each listed mutant failed its named check and was restored. The two text caps were also checked after adding the real provider archive case.
embedding:python3 native/scripts/check-share.pyfailed as required.extension-api-only:python3 native/scripts/check-share.pyfailed as required.activation-file-bound:python3 native/scripts/check-share.pyfailed as required.keychain-group:python3 native/scripts/check-share.pyfailed as required.services-provider:python3 native/scripts/check-share.pyfailed as required.credential-expiry:swift test --package-path native/share --jobs 4 --filter shareAuthorityfailed an expectation; restored.account-origin:swift test --package-path native/share --jobs 4 --filter shareAuthorityfailed an expectation; restored.account-person:swift test --package-path native/share --jobs 4 --filter shareAuthorityfailed an expectation; restored.identity-revocation:swift test --package-path native/share --jobs 4 --filter shareAuthorityfailed an expectation; restored.selection-generation:swift test --package-path native/share --jobs 4 --filter shareAuthorityfailed an expectation; restored.https-origin:swift test --package-path native/share --jobs 4 --filter shareAuthorityfailed an expectation; restored.post-response-binding:swift test --package-path native/share --jobs 4 --filter accountSwitchfailed an expectation; restored.post-response-cancellation:swift test --package-path native/share --jobs 4 --filter refusedOrCancelledfailed an expectation; restored.busy-send:swift test --package-path native/share --jobs 4 --filter uncertainSendfailed an expectation; restored.response-bound:swift test --package-path native/share --jobs 4 --filter refusedOrCancelledfailed an expectation; restored.http-response-bound:swift test --package-path native/share --jobs 4 --filter fileUploadfailed an expectation; restored.redirect-refusal:swift test --package-path native/share --jobs 4 --filter fileUploadfailed an expectation; restored.journal-expiry:swift test --package-path native/share --jobs 4 --filter interruptedSend|journalClockfailed an expectation; restored.journal-recipient:swift test --package-path native/share --jobs 4 --filter interruptedSendfailed an expectation; restored.late-acknowledgement:swift test --package-path native/share --jobs 4 --filter journalNeverfailed an expectation; restored.source-byte-bound:swift test --package-path native/share --jobs 4 --filter filePreparationfailed an expectation; restored.scoped-metadata:swift test --package-path native/share --jobs 4 --filter filePreparationfailed an expectation; restored.screenshot-age:swift test --package-path native/share --jobs 4 --filter screenshotRefuses|screenshotWindowfailed an expectation; restored.screenshot-permission:swift test --package-path native/share --jobs 4 --filter screenshotRefuses|screenshotWindowfailed an expectation; restored.screenshot-dismissal:swift test --package-path native/share --jobs 4 --filter screenshotRefuses|screenshotWindowfailed an expectation; restored.current-grant:swift test --package-path native/share --jobs 4 --filter pinnedOficinafailed an expectation; restored.grant-token-size:swift test --package-path native/share --jobs 4 --filter pinnedOficinafailed an expectation; restored.provider-archive-text-cap:swift test --package-path native/share --jobs 4 --filter providerTextfailed an expectation; restored.provider-raw-text-cap:swift test --package-path native/share --jobs 4 --filter providerTextfailed an expectation; restored.
Fable review fixes, 2026-11-27
A new share always starts with its own inputs and independent idempotency key. Earlier unconfirmed requests appear above the compose with the Luna-approved native.share.earlier_unconfirmed notice and the existing reviewed Try again and Discard labels. Retrying one sends its original body and key, clears only its journal entry, and never finishes the new compose. The new message can send while older requests remain unresolved. A definite 4xx other than 401/403 clears only the refused write and shows the reviewed error for its code. Authentication and uncertain failures preserve the journal.
The recipient journal now stores independently keyed records under its existing lock, protection and backup exclusion. It reads the previous single-record format, keeps each original 24-hour deadline, and bounds storage to 32 requests and 1 MiB. No credentials are added to the journal. There are no further signing API writes.
Screenshot staging is transferred to the attachment draft, which retains it for Retry and removes it on remove, clear or destruction. Its display name is Screenshot.png. Swiping down the explanation invokes the same decline policy as Not now. Mac Services reports the actual size/count preparation failure using existing reviewed words.
Verification follows the current machine rules: narrow Swift filters, four workers, one heavy process, and load/swap/process checks before each. No local full gate, simulator or fixture app was started for this delta. Linux CI remains the full repository gate.
- Red: the new earlier-send tests first failed to compile against the missing independent-send APIs. Restoring the old screenshot lifetime/name and generic Mac error behavior then failed eight expectations in the focused platform run.
- Green:
swift test --package-path native/share --jobs 4 --filter 'EarlierShareTests|journal|Journal|uncertainSend|interruptedSend': 12 tests passed, including fresh-sender replay, independent A/B sends, definite refusals, authentication/uncertain failures, double retry, concurrent writers and legacy journal decoding. - Green:
swift test --package-path native/apple --jobs 4 --filter 'stagedScreenshot|serviceReceivesInput|clearCancelsEvery': 3 tests passed, with parameter cases for remove/clear and URL/count/size input. check-strings.py,check-parity.py(336 matching web strings),check-share.py,check-oficina-id.pyandcheck-sign-in-lifetime.pypass. The platform-only explanation dismissal and incoming-item preparation are pinned by the packaging guard, alongside the existing runtime policy tests.
All 17 delta mutations failed their focused guard and were restored:
old-hijacks-new:swift test --package-path native/share --jobs 4 --filter lostACancelexited 1 with an expectation/assertion failure.pending-blocks-new:swift test --package-path native/share --jobs 4 --filter newSendAndDiscardexited 1 with an expectation/assertion failure.old-retry-new-key:swift test --package-path native/share --jobs 4 --filter lostACancelexited 1 with an expectation/assertion failure.old-retry-closes-new:swift test --package-path native/share --jobs 4 --filter lostACancelexited 1 with an expectation/assertion failure.discard-does-not-persist:swift test --package-path native/share --jobs 4 --filter newSendAndDiscardexited 1 with an expectation/assertion failure.permanent-refusal-retained:swift test --package-path native/share --jobs 4 --filter permanentRefusalexited 1 with an expectation/assertion failure.journal-not-saved-before-post:swift test --package-path native/share --jobs 4 --filter lostACancelexited 1 with an expectation/assertion failure.late-ack-clears-another:swift test --package-path native/share --jobs 4 --filter newSendAndDiscard|journalNeverexited 1 with an expectation/assertion failure.double-earlier-post:swift test --package-path native/share --jobs 4 --filter doubleTapEarlierexited 1 with an expectation/assertion failure.remove-keeps-staged-file:swift test --package-path native/apple --jobs 4 --filter stagedScreenshotexited 1 with an expectation/assertion failure.clear-keeps-staged-file:swift test --package-path native/apple --jobs 4 --filter stagedScreenshotexited 1 with an expectation/assertion failure.staged-uuid-name:swift test --package-path native/apple --jobs 4 --filter stagedScreenshotexited 1 with an expectation/assertion failure.mac-too-many-as-size:swift test --package-path native/apple --jobs 4 --filter serviceReceivesInputexited 1 with an expectation/assertion failure.mac-generic-preparation:swift test --package-path native/apple --jobs 4 --filter serviceReceivesInputexited 1 with an expectation/assertion failure.swipe-explanation:python3 native/scripts/check-share.pyexited 1 with an expectation/assertion failure.screenshot-delete-before-retry:python3 native/scripts/check-share.pyexited 1 with an expectation/assertion failure.extension-skips-new-input:python3 native/scripts/check-share.pyexited 1 with an expectation/assertion failure.