<a id="ch-17"></a>

## Chapter 17 — Backup and staging are separate bits

<!-- open-cyber-academy:lesson-figures:start ch-17 -->
### Lesson map

Lesson 17. Map, example, EX063.

```mermaid
flowchart TD
  B["backup taken = True"] --> P["Its own bracket"]
  S["tested on staging copy = True"] --> R["Its own bracket"]
  P --> Q{"Does one True imply the other?"}
  R --> Q
  Q -->|No| K["Both happen to be true in this file"]
```

Two keys. Either could have been false alone. In this file, neither is.

### Logical drawing

```text
[x] backup taken
[x] tested on staging copy
date stored on either bit: none
donor row stored on either bit: none
```
<!-- open-cyber-academy:lesson-figures:end ch-17 -->

### Learning outcomes

After this chapter, you should be able to:

1. Keep the two Booleans independent.
2. Place the restore and the synthetic donations in prose.
3. Refuse a date or a donor record inside either bit.

### 17.1 Each literal answers one question. Neither bit describes the bytes.

`backup taken` is the literal `True`. `tested on staging copy` is another literal `True`. The dictionary does not check that the second is true only when the first is true. A file could store a test without a backup, or a backup without a test. This file stores both as true. The two brackets are two lines because they are two keys.

The prose says Owen restored a backup to staging once, and later tested donate-form there with synthetic donations. The restore is one event told in sentences. It is not a date inside either Boolean. The synthetic donations are not rows in `checks`. No donor name, no amount, and no card number is available to copy. Card numbers are described as staying with the payment provider. The provider's systems are out of scope, and this dictionary does not assess them.

A change log line, in the prose, records what changed, when, and how to undo it. Those three log fields are not keys in `checks`. The bits do not say which backup file was used. Asking the script for a filename asks for a string it does not hold.

| Key | Value | What the prose adds, outside the bit |
|---|---|---|
| backup taken | True | One restore onto staging, earlier |
| tested on staging copy | True | Synthetic donations, no real donor rows |
| either bit | no date field | The change log carries "when", in prose |

### 17.2 Worked example

| Claim | Independence | Decision |
|---|---|---|
| Both brackets are `x` | Both literals are `True` | Keep |
| A backup without a test is representable | The bits do not imply each other | Keep as a property of the dictionary |
| "The script printed the restore date." | No date is stored | Refuse |
| "Synthetic donors are rows in `checks`." | They are prose only | Refuse |

> **Synthetic case.** Staging uses synthetic records. None are listed in the checklist.

### Errors and limits

Do not fill a Boolean with a filename, a date, or a donor.

### Apply

- **EX063 — Two bits.** Both backup and staging print `x`. A classmate treats them as one fact, adds the restore date, and lists a synthetic donor. What does each key store? *Rubric:* 3 = each key stores its own literal `True`; one does not imply the other in the program, though both are true here; the date and the donor stay prose;; 2 = two Booleans stay and the date stays out;; 1 = one bit;; 0 = none.

<!-- open-cyber-academy:chapter-navigation:start ch-17 -->
### Continue studying — lesson 17 (chapter 17 of 20)

[← Chapter 16](#ch-16) · [Course chapter index](../SUBJECTS.md) · [Chapter 18 →](#ch-18)

Continue to the next authored lesson.
<!-- open-cyber-academy:chapter-navigation:end -->

## Worked answers

<a id="answer-ex063"></a>
**EX063.** `backup taken` and `tested on staging copy` are separate literals, both true here. One does not imply the other in the program. The restore date and the synthetic donor are prose.
