Revision history and recovery
이 상세 자료는 아직 한국어로 번역되지 않아 영문 원문을 표시합니다.
GA 공개 출처와 지원 범위
- Status
- GA
- Component
- .gram format / Gram Core
- Deployment
- n/a (format spec)
- Applies to version
- Latest
- 출처 확인일
- 2026-10-25
- Owner
- thegram-one/thegram-format
- Public evidence
- Basis
- The public format overview confirms that revisions are kept in the same plain-text file, though it does not independently specify History/6.
All pages: version and status matrix
출처 확인은 실제 계정 설치·기기 동작·서비스 상태의 검증을 뜻하지 않습니다.
Current journal
Section titled “Current journal”The current writer stores the latest @gram 2 source at the front of the file and a @gram-history 6 trailer after it. Revision zero captures the initial source; each later revision has runtime-recorded metadata and reverse line hunks that reconstruct the prior state. A SHA-256 chain binds each revision header and reconstructed source. Core audits the complete journal before writes. History bytes and revision metadata are runtime-owned; do not author or hand-edit the trailer.
gram_state selects one state by exactly one of revision, recorded_at or effective_at. A historical MCP read includes at and cites the current document CAS identity separately. gram_changes is an incremental revision summary; gram_range is a bounded event/range view; neither replaces full Core replay. gram_read without a selector reads the current document outline/section, not a replay.
CAS and idempotent patching
Section titled “CAS and idempotent patching”Before a patch, obtain the current base_revision and artifact hash from a current document result. Send both as base_revision and expected_hash, plus a unique request_id of 1–128 characters and nonempty operations. The request ID is the idempotency key for that exact intent: reuse it only when retrying the identical request after an uncertain response. A different payload with the same ID is E_REQUEST_REUSE. Create has base_revision: null and does not accept a request ID.
If a gram_patch response is lost, the public tools provide no standalone receipt lookup; resend the exact same intent with the same request ID so Core can replay its receipt. If the outcome remains unknown, do not invent success or change the request. A gram_create has no request ID; read the target path before further action after a lost response. On stale CAS/conflict, reread current revision and hash, reconsider the intended change against that state, and submit a new request ID.
Legacy distinctions
Section titled “Legacy distinctions”@gram 1 and History/1–5 are legacy read inputs, not current output. Current writes use @gram 2 and History/6. Core's explicit History/6 migration preserves revisions and metadata. Mutating older history or @gram 1 follows Core's implicit migration rules, may renumber legacy rich-node IDs, and reports migration provenance. Bare legacy JSON in a rich block is rejected with E_MIGRATION; legacy JSON-rich is not current gram-rich/1 interchange. History/5 was a former writer format and is not a current migration target for History/1–4.
For an ambiguous patch, retry the exact same intent and request ID; for a create, read the target path first. For a stale cursor/read, reacquire current page/state before proceeding. Never edit the journal trailer directly.
Source
Section titled “Source”Source: .gram language specification
Reference: https://github.com/clab-one/thegram-format/blob/main/spec/language.md
Source: Current rich document specification
Reference: https://github.com/clab-one/thegram-format/blob/main/spec/rich-document.md
Source: Current History/6 specification
Reference: https://github.com/clab-one/thegram-format/blob/main/spec/source-history-render.md
Source and renderer evidence
- Canonical source SHA-256
b797f6f55a517ca72d6d373ab93a8b4c0ae007ae6af22d93556f9cccab166bc4- Selected revision
r3 · sha256:3016646205124dac6dd2b7cabc3883a8cace7ff4f71f391c714578196a1c0ac3- Local renderer
configured local Thegram renderer · API thegram-web-render/1- Core source
git+https://github.com/clab-one/thegram-format.git?rev=b16489e1d0d77d38f82d2f61776524737aa31557#b16489e1d0d77d38f82d2f61776524737aa31557
Canonical source: history-guide.gram