본문 바로가기
C.W.K.
Stream
Lesson 03 of 04 · published

Attachment 가 경계를 건너

~12 min · 첨부물, 저장, manifest, 보존

Level 0차가운 용기
0 XP0/37 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

Attachment 가 경계를 건너

범위 잡힌 작업이 text 안에 다 안 들어갈 때가 있어. spreadsheet, screenshot, export, source packet 이 executor 가 봐야 할 증거일 수 있지. attachment 는 delegation package 에 속하지만 작업장을 구현한 source repository 에 속하진 않아.

engine-owned material store 가 별도 생애주기를 줘. metadata 는 delegation 과 함께 살아. original name, media type, byte size, digest, storage key 같은 것들. blob 은 Git 밖에서 limit 와 access rule 아래 살고. brief 는 manifest 를 담아서 byte 를 prose 에 박지 않고도 author 가 뭐가 있는지 알게 해.

upload 와 replacement 는 queued-only mutation 이야. take 는 manifest 와 byte 를 같이 얼려. 아직 queued 인 delegation 을 지우면 material 도 없앨 수 있지만, taken, landed, abandoned record 는 session 이 뭘 봤는지 설명해야 하니 package 를 지켜.

attachment 를 serve 할 때는 좁은 identifier 와 authorization 이 필요해. raw filesystem path 는 API 를 건너지 않아. request 는 delegation 과 attachment key 를 resolve 하고, ownership 과 state 를 확인하고, 안전한 content type 과 filename 으로 stored byte 를 stream 해.

byte 보다 manifest 먼저

session 이 manifest 를 먼저 보게 해. name, size, type, digest 를 보고 directory 를 뒤지거나 private path 를 추측하지 않고 어떤 file 을 열지 고를 수 있어.

생애주기를 matrix 로 검증해. upload, replace, take, read, delegation delete, retention 을 다 봐. happy-path download 하나는 경계를 거의 증명하지 못해.

attachment 는 engine 이 byte 를 소유한 뒤에야 evidence 가 돼. size 와 identity rule 안에서 file 을 ingest 하고, 저장된 object 를 work order 에 묶어. 다른 사람의 mutable filesystem 을 가리키는 path 는 잠깐의 hint 일 뿐이야. durable input 이 되려면 실행 중에도 같은 byte 라는 보장이 있어야 해.

Code

Build an attachment manifest without leaking paths·python
from hashlib import sha256

payload = b"account,total\nA,42\n"
manifest = {
    "name": "summary.csv",
    "media_type": "text/csv",
    "size": len(payload),
    "sha256": sha256(payload).hexdigest(),
}
assert "path" not in manifest
print(manifest)

External links

Exercise

attachment 하나의 생애주기 matrix 를 만들어. queued, taken, landed, abandoned 에서 어떤 동작을 허용할지와 이유를 써.
Hint
read permission 과 mutation permission 을 갈라.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고
💛 by 피파warm

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.